Struct gba::fixed::Fixed

source ·
#[repr(transparent)]
pub struct Fixed<I, const B: u32>(_);
Expand description

A fixed-point number. This transparently wraps an integer with a const generic for how many bits are fractional.

  • This type is generic, but the I type is intended to be a signed or unsigned integer of a fixed bit size: i8, i16, i32, u8, u16, or u32. This type is not semver supported to work with any other I type. If it does work for other types of I, that’s on accident.
  • The B value is the number of bits that form the fractional part. It should be less than the number of bits in the integer’s type. Multiply and divide ops need to shift the value by B, and so if B is greater than or equal to the integer’s size the op will panic.

Implementations§

source§

impl<const B: u32> Fixed<i8, B>

source

pub const fn wrapping_from(i: i8) -> Self

Shifts the value left by B, wrapping it into the range of this Fixed type.

source

pub const fn from_raw(i: i8) -> Self

Makes a Fixed directly from a raw inner value (no shift).

source

pub const fn into_raw(self) -> i8

Unwraps the inner value directly into the base type (no shift).

source

pub const fn not(self) -> Self

Bitwise Not.

source

pub const fn add(self, rhs: Self) -> Self

Addition.

source

pub const fn sub(self, rhs: Self) -> Self

Subtraction.

source

pub const fn rem(self, rhs: Self) -> Self

Remainder.

source

pub const fn bitand(self, rhs: Self) -> Self

Bitwise AND.

source

pub const fn bitor(self, rhs: Self) -> Self

Bitwise OR.

source

pub const fn bitxor(self, rhs: Self) -> Self

Bitwise XOR.

source

pub const fn shl(self, rhs: u32) -> Self

Bit-shift Left.

source

pub const fn shr(self, rhs: u32) -> Self

Bit-shift Right.

source§

impl<const B: u32> Fixed<i16, B>

source

pub const fn wrapping_from(i: i16) -> Self

Shifts the value left by B, wrapping it into the range of this Fixed type.

source

pub const fn from_raw(i: i16) -> Self

Makes a Fixed directly from a raw inner value (no shift).

source

pub const fn into_raw(self) -> i16

Unwraps the inner value directly into the base type (no shift).

source

pub const fn not(self) -> Self

Bitwise Not.

source

pub const fn add(self, rhs: Self) -> Self

Addition.

source

pub const fn sub(self, rhs: Self) -> Self

Subtraction.

source

pub const fn rem(self, rhs: Self) -> Self

Remainder.

source

pub const fn bitand(self, rhs: Self) -> Self

Bitwise AND.

source

pub const fn bitor(self, rhs: Self) -> Self

Bitwise OR.

source

pub const fn bitxor(self, rhs: Self) -> Self

Bitwise XOR.

source

pub const fn shl(self, rhs: u32) -> Self

Bit-shift Left.

source

pub const fn shr(self, rhs: u32) -> Self

Bit-shift Right.

source§

impl<const B: u32> Fixed<i32, B>

source

pub const fn wrapping_from(i: i32) -> Self

Shifts the value left by B, wrapping it into the range of this Fixed type.

Examples found in repository?
examples/hello.rs (line 43)
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
extern "C" fn main() -> ! {
  RUST_IRQ_HANDLER.write(Some(irq_handler));
  DISPSTAT.write(DisplayStatus::new().with_irq_vblank(true));
  IE.write(IrqBits::VBLANK);
  IME.write(true);

  if let Ok(mut logger) = MgbaBufferedLogger::try_new(MgbaMessageLevel::Debug) {
    writeln!(logger, "hello!").ok();

    let fx_u: Fixed<u32, 8> =
      Fixed::<u32, 8>::wrapping_from(7) + Fixed::<u32, 8>::from_raw(12);
    writeln!(logger, "fixed unsigned: {fx_u:?}").ok();

    let fx_i1: Fixed<i32, 8> =
      Fixed::<i32, 8>::wrapping_from(8) + Fixed::<i32, 8>::from_raw(15);
    writeln!(logger, "fixed signed positive: {fx_i1:?}").ok();

    let fx_i2: Fixed<i32, 8> = Fixed::<i32, 8>::wrapping_from(0)
      - Fixed::<i32, 8>::wrapping_from(3)
      - Fixed::<i32, 8>::from_raw(17);
    writeln!(logger, "fixed signed negative: {fx_i2:?}").ok();
  }

  {
    // get our tile data into memory.
    Cga8x8Thick.bitunpack_4bpp(CHARBLOCK0_4BPP.as_region(), 0);
  }

  {
    // set up the tilemap
    let tsb = TEXT_SCREENBLOCKS.get_frame(31).unwrap();
    for y in 0..16 {
      let row = tsb.get_row(y).unwrap();
      for (x, addr) in row.iter().enumerate().take(16) {
        let te = TextEntry::new().with_tile((y * 16 + x) as u16);
        addr.write(te);
      }
    }
  }

  {
    // Set BG0 to use the tilemap we just made, and set it to be shown.
    BG0CNT.write(BackgroundControl::new().with_screenblock(31));
    DISPCNT.write(DisplayControl::new().with_show_bg0(true));
  }

  let mut x_off = 0_u32;
  let mut y_off = 0_u32;
  let mut backdrop_color = Color(0);
  loop {
    VBlankIntrWait();
    // show current frame
    BACKDROP_COLOR.write(backdrop_color);
    BG0HOFS.write(x_off as u16);
    BG0VOFS.write(y_off as u16);

    // prep next frame
    let k = FRAME_KEYS.read();
    backdrop_color = Color(k.to_u16());
    if k.up() {
      y_off = y_off.wrapping_add(1);
    }
    if k.down() {
      y_off = y_off.wrapping_sub(1);
    }
    if k.left() {
      x_off = x_off.wrapping_add(1);
    }
    if k.right() {
      x_off = x_off.wrapping_sub(1);
    }
  }
}
source

pub const fn from_raw(i: i32) -> Self

Makes a Fixed directly from a raw inner value (no shift).

Examples found in repository?
examples/hello.rs (line 43)
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
extern "C" fn main() -> ! {
  RUST_IRQ_HANDLER.write(Some(irq_handler));
  DISPSTAT.write(DisplayStatus::new().with_irq_vblank(true));
  IE.write(IrqBits::VBLANK);
  IME.write(true);

  if let Ok(mut logger) = MgbaBufferedLogger::try_new(MgbaMessageLevel::Debug) {
    writeln!(logger, "hello!").ok();

    let fx_u: Fixed<u32, 8> =
      Fixed::<u32, 8>::wrapping_from(7) + Fixed::<u32, 8>::from_raw(12);
    writeln!(logger, "fixed unsigned: {fx_u:?}").ok();

    let fx_i1: Fixed<i32, 8> =
      Fixed::<i32, 8>::wrapping_from(8) + Fixed::<i32, 8>::from_raw(15);
    writeln!(logger, "fixed signed positive: {fx_i1:?}").ok();

    let fx_i2: Fixed<i32, 8> = Fixed::<i32, 8>::wrapping_from(0)
      - Fixed::<i32, 8>::wrapping_from(3)
      - Fixed::<i32, 8>::from_raw(17);
    writeln!(logger, "fixed signed negative: {fx_i2:?}").ok();
  }

  {
    // get our tile data into memory.
    Cga8x8Thick.bitunpack_4bpp(CHARBLOCK0_4BPP.as_region(), 0);
  }

  {
    // set up the tilemap
    let tsb = TEXT_SCREENBLOCKS.get_frame(31).unwrap();
    for y in 0..16 {
      let row = tsb.get_row(y).unwrap();
      for (x, addr) in row.iter().enumerate().take(16) {
        let te = TextEntry::new().with_tile((y * 16 + x) as u16);
        addr.write(te);
      }
    }
  }

  {
    // Set BG0 to use the tilemap we just made, and set it to be shown.
    BG0CNT.write(BackgroundControl::new().with_screenblock(31));
    DISPCNT.write(DisplayControl::new().with_show_bg0(true));
  }

  let mut x_off = 0_u32;
  let mut y_off = 0_u32;
  let mut backdrop_color = Color(0);
  loop {
    VBlankIntrWait();
    // show current frame
    BACKDROP_COLOR.write(backdrop_color);
    BG0HOFS.write(x_off as u16);
    BG0VOFS.write(y_off as u16);

    // prep next frame
    let k = FRAME_KEYS.read();
    backdrop_color = Color(k.to_u16());
    if k.up() {
      y_off = y_off.wrapping_add(1);
    }
    if k.down() {
      y_off = y_off.wrapping_sub(1);
    }
    if k.left() {
      x_off = x_off.wrapping_add(1);
    }
    if k.right() {
      x_off = x_off.wrapping_sub(1);
    }
  }
}
source

pub const fn into_raw(self) -> i32

Unwraps the inner value directly into the base type (no shift).

source

pub const fn not(self) -> Self

Bitwise Not.

source

pub const fn add(self, rhs: Self) -> Self

Addition.

source

pub const fn sub(self, rhs: Self) -> Self

Subtraction.

source

pub const fn rem(self, rhs: Self) -> Self

Remainder.

source

pub const fn bitand(self, rhs: Self) -> Self

Bitwise AND.

source

pub const fn bitor(self, rhs: Self) -> Self

Bitwise OR.

source

pub const fn bitxor(self, rhs: Self) -> Self

Bitwise XOR.

source

pub const fn shl(self, rhs: u32) -> Self

Bit-shift Left.

source

pub const fn shr(self, rhs: u32) -> Self

Bit-shift Right.

source§

impl<const B: u32> Fixed<u8, B>

source

pub const fn wrapping_from(i: u8) -> Self

Shifts the value left by B, wrapping it into the range of this Fixed type.

source

pub const fn from_raw(i: u8) -> Self

Makes a Fixed directly from a raw inner value (no shift).

source

pub const fn into_raw(self) -> u8

Unwraps the inner value directly into the base type (no shift).

source

pub const fn not(self) -> Self

Bitwise Not.

source

pub const fn add(self, rhs: Self) -> Self

Addition.

source

pub const fn sub(self, rhs: Self) -> Self

Subtraction.

source

pub const fn rem(self, rhs: Self) -> Self

Remainder.

source

pub const fn bitand(self, rhs: Self) -> Self

Bitwise AND.

source

pub const fn bitor(self, rhs: Self) -> Self

Bitwise OR.

source

pub const fn bitxor(self, rhs: Self) -> Self

Bitwise XOR.

source

pub const fn shl(self, rhs: u32) -> Self

Bit-shift Left.

source

pub const fn shr(self, rhs: u32) -> Self

Bit-shift Right.

source§

impl<const B: u32> Fixed<u16, B>

source

pub const fn wrapping_from(i: u16) -> Self

Shifts the value left by B, wrapping it into the range of this Fixed type.

source

pub const fn from_raw(i: u16) -> Self

Makes a Fixed directly from a raw inner value (no shift).

source

pub const fn into_raw(self) -> u16

Unwraps the inner value directly into the base type (no shift).

source

pub const fn not(self) -> Self

Bitwise Not.

source

pub const fn add(self, rhs: Self) -> Self

Addition.

source

pub const fn sub(self, rhs: Self) -> Self

Subtraction.

source

pub const fn rem(self, rhs: Self) -> Self

Remainder.

source

pub const fn bitand(self, rhs: Self) -> Self

Bitwise AND.

source

pub const fn bitor(self, rhs: Self) -> Self

Bitwise OR.

source

pub const fn bitxor(self, rhs: Self) -> Self

Bitwise XOR.

source

pub const fn shl(self, rhs: u32) -> Self

Bit-shift Left.

source

pub const fn shr(self, rhs: u32) -> Self

Bit-shift Right.

source§

impl<const B: u32> Fixed<u32, B>

source

pub const fn wrapping_from(i: u32) -> Self

Shifts the value left by B, wrapping it into the range of this Fixed type.

Examples found in repository?
examples/hello.rs (line 39)
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
extern "C" fn main() -> ! {
  RUST_IRQ_HANDLER.write(Some(irq_handler));
  DISPSTAT.write(DisplayStatus::new().with_irq_vblank(true));
  IE.write(IrqBits::VBLANK);
  IME.write(true);

  if let Ok(mut logger) = MgbaBufferedLogger::try_new(MgbaMessageLevel::Debug) {
    writeln!(logger, "hello!").ok();

    let fx_u: Fixed<u32, 8> =
      Fixed::<u32, 8>::wrapping_from(7) + Fixed::<u32, 8>::from_raw(12);
    writeln!(logger, "fixed unsigned: {fx_u:?}").ok();

    let fx_i1: Fixed<i32, 8> =
      Fixed::<i32, 8>::wrapping_from(8) + Fixed::<i32, 8>::from_raw(15);
    writeln!(logger, "fixed signed positive: {fx_i1:?}").ok();

    let fx_i2: Fixed<i32, 8> = Fixed::<i32, 8>::wrapping_from(0)
      - Fixed::<i32, 8>::wrapping_from(3)
      - Fixed::<i32, 8>::from_raw(17);
    writeln!(logger, "fixed signed negative: {fx_i2:?}").ok();
  }

  {
    // get our tile data into memory.
    Cga8x8Thick.bitunpack_4bpp(CHARBLOCK0_4BPP.as_region(), 0);
  }

  {
    // set up the tilemap
    let tsb = TEXT_SCREENBLOCKS.get_frame(31).unwrap();
    for y in 0..16 {
      let row = tsb.get_row(y).unwrap();
      for (x, addr) in row.iter().enumerate().take(16) {
        let te = TextEntry::new().with_tile((y * 16 + x) as u16);
        addr.write(te);
      }
    }
  }

  {
    // Set BG0 to use the tilemap we just made, and set it to be shown.
    BG0CNT.write(BackgroundControl::new().with_screenblock(31));
    DISPCNT.write(DisplayControl::new().with_show_bg0(true));
  }

  let mut x_off = 0_u32;
  let mut y_off = 0_u32;
  let mut backdrop_color = Color(0);
  loop {
    VBlankIntrWait();
    // show current frame
    BACKDROP_COLOR.write(backdrop_color);
    BG0HOFS.write(x_off as u16);
    BG0VOFS.write(y_off as u16);

    // prep next frame
    let k = FRAME_KEYS.read();
    backdrop_color = Color(k.to_u16());
    if k.up() {
      y_off = y_off.wrapping_add(1);
    }
    if k.down() {
      y_off = y_off.wrapping_sub(1);
    }
    if k.left() {
      x_off = x_off.wrapping_add(1);
    }
    if k.right() {
      x_off = x_off.wrapping_sub(1);
    }
  }
}
source

pub const fn from_raw(i: u32) -> Self

Makes a Fixed directly from a raw inner value (no shift).

Examples found in repository?
examples/hello.rs (line 39)
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
extern "C" fn main() -> ! {
  RUST_IRQ_HANDLER.write(Some(irq_handler));
  DISPSTAT.write(DisplayStatus::new().with_irq_vblank(true));
  IE.write(IrqBits::VBLANK);
  IME.write(true);

  if let Ok(mut logger) = MgbaBufferedLogger::try_new(MgbaMessageLevel::Debug) {
    writeln!(logger, "hello!").ok();

    let fx_u: Fixed<u32, 8> =
      Fixed::<u32, 8>::wrapping_from(7) + Fixed::<u32, 8>::from_raw(12);
    writeln!(logger, "fixed unsigned: {fx_u:?}").ok();

    let fx_i1: Fixed<i32, 8> =
      Fixed::<i32, 8>::wrapping_from(8) + Fixed::<i32, 8>::from_raw(15);
    writeln!(logger, "fixed signed positive: {fx_i1:?}").ok();

    let fx_i2: Fixed<i32, 8> = Fixed::<i32, 8>::wrapping_from(0)
      - Fixed::<i32, 8>::wrapping_from(3)
      - Fixed::<i32, 8>::from_raw(17);
    writeln!(logger, "fixed signed negative: {fx_i2:?}").ok();
  }

  {
    // get our tile data into memory.
    Cga8x8Thick.bitunpack_4bpp(CHARBLOCK0_4BPP.as_region(), 0);
  }

  {
    // set up the tilemap
    let tsb = TEXT_SCREENBLOCKS.get_frame(31).unwrap();
    for y in 0..16 {
      let row = tsb.get_row(y).unwrap();
      for (x, addr) in row.iter().enumerate().take(16) {
        let te = TextEntry::new().with_tile((y * 16 + x) as u16);
        addr.write(te);
      }
    }
  }

  {
    // Set BG0 to use the tilemap we just made, and set it to be shown.
    BG0CNT.write(BackgroundControl::new().with_screenblock(31));
    DISPCNT.write(DisplayControl::new().with_show_bg0(true));
  }

  let mut x_off = 0_u32;
  let mut y_off = 0_u32;
  let mut backdrop_color = Color(0);
  loop {
    VBlankIntrWait();
    // show current frame
    BACKDROP_COLOR.write(backdrop_color);
    BG0HOFS.write(x_off as u16);
    BG0VOFS.write(y_off as u16);

    // prep next frame
    let k = FRAME_KEYS.read();
    backdrop_color = Color(k.to_u16());
    if k.up() {
      y_off = y_off.wrapping_add(1);
    }
    if k.down() {
      y_off = y_off.wrapping_sub(1);
    }
    if k.left() {
      x_off = x_off.wrapping_add(1);
    }
    if k.right() {
      x_off = x_off.wrapping_sub(1);
    }
  }
}
source

pub const fn into_raw(self) -> u32

Unwraps the inner value directly into the base type (no shift).

source

pub const fn not(self) -> Self

Bitwise Not.

source

pub const fn add(self, rhs: Self) -> Self

Addition.

source

pub const fn sub(self, rhs: Self) -> Self

Subtraction.

source

pub const fn rem(self, rhs: Self) -> Self

Remainder.

source

pub const fn bitand(self, rhs: Self) -> Self

Bitwise AND.

source

pub const fn bitor(self, rhs: Self) -> Self

Bitwise OR.

source

pub const fn bitxor(self, rhs: Self) -> Self

Bitwise XOR.

source

pub const fn shl(self, rhs: u32) -> Self

Bit-shift Left.

source

pub const fn shr(self, rhs: u32) -> Self

Bit-shift Right.

source§

impl<const B: u32> Fixed<i8, B>

source

pub const fn neg(self) -> Self

Negate.

source

pub const fn is_negative(self) -> bool

If the number is negative or not.

source

pub const fn mul(self, rhs: Self) -> Self

Multiply.

source

pub const fn div(self, rhs: Self) -> Self

Divide.

source

pub const fn fract(self) -> Self

Fractional part of the value.

source

pub const fn trunc(self) -> Self

Whole part of the value.

source§

impl<const B: u32> Fixed<i16, B>

source

pub const fn neg(self) -> Self

Negate.

source

pub const fn is_negative(self) -> bool

If the number is negative or not.

source

pub const fn mul(self, rhs: Self) -> Self

Multiply.

source

pub const fn div(self, rhs: Self) -> Self

Divide.

source

pub const fn fract(self) -> Self

Fractional part of the value.

source

pub const fn trunc(self) -> Self

Whole part of the value.

source§

impl<const B: u32> Fixed<i32, B>

source

pub const fn neg(self) -> Self

Negate.

source

pub const fn is_negative(self) -> bool

If the number is negative or not.

source

pub const fn mul(self, rhs: Self) -> Self

Multiply.

source

pub const fn div(self, rhs: Self) -> Self

Divide.

source

pub const fn fract(self) -> Self

Fractional part of the value.

source

pub const fn trunc(self) -> Self

Whole part of the value.

source§

impl<const B: u32> Fixed<u8, B>

source

pub const fn mul(self, rhs: Self) -> Self

Multiply.

source

pub const fn div(self, rhs: Self) -> Self

Divide.

source

pub const fn fract(self) -> Self

Fractional part of the value.

source

pub const fn trunc(self) -> Self

Whole part of the value.

source§

impl<const B: u32> Fixed<u16, B>

source

pub const fn mul(self, rhs: Self) -> Self

Multiply.

source

pub const fn div(self, rhs: Self) -> Self

Divide.

source

pub const fn fract(self) -> Self

Fractional part of the value.

source

pub const fn trunc(self) -> Self

Whole part of the value.

source§

impl<const B: u32> Fixed<u32, B>

source

pub const fn mul(self, rhs: Self) -> Self

Multiply.

source

pub const fn div(self, rhs: Self) -> Self

Divide.

source

pub const fn fract(self) -> Self

Fractional part of the value.

source

pub const fn trunc(self) -> Self

Whole part of the value.

Trait Implementations§

source§

impl<const B: u32> Add<Fixed<i16, B>> for Fixed<i16, B>

§

type Output = Fixed<i16, B>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl<const B: u32> Add<Fixed<i32, B>> for Fixed<i32, B>

§

type Output = Fixed<i32, B>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl<const B: u32> Add<Fixed<i8, B>> for Fixed<i8, B>

§

type Output = Fixed<i8, B>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl<const B: u32> Add<Fixed<u16, B>> for Fixed<u16, B>

§

type Output = Fixed<u16, B>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl<const B: u32> Add<Fixed<u32, B>> for Fixed<u32, B>

§

type Output = Fixed<u32, B>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl<const B: u32> Add<Fixed<u8, B>> for Fixed<u8, B>

§

type Output = Fixed<u8, B>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl<const B: u32> AddAssign<Fixed<i16, B>> for Fixed<i16, B>

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl<const B: u32> AddAssign<Fixed<i32, B>> for Fixed<i32, B>

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl<const B: u32> AddAssign<Fixed<i8, B>> for Fixed<i8, B>

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl<const B: u32> AddAssign<Fixed<u16, B>> for Fixed<u16, B>

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl<const B: u32> AddAssign<Fixed<u32, B>> for Fixed<u32, B>

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl<const B: u32> AddAssign<Fixed<u8, B>> for Fixed<u8, B>

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl<const B: u32> BitAnd<Fixed<i16, B>> for Fixed<i16, B>

§

type Output = Fixed<i16, B>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
source§

impl<const B: u32> BitAnd<Fixed<i32, B>> for Fixed<i32, B>

§

type Output = Fixed<i32, B>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
source§

impl<const B: u32> BitAnd<Fixed<i8, B>> for Fixed<i8, B>

§

type Output = Fixed<i8, B>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
source§

impl<const B: u32> BitAnd<Fixed<u16, B>> for Fixed<u16, B>

§

type Output = Fixed<u16, B>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
source§

impl<const B: u32> BitAnd<Fixed<u32, B>> for Fixed<u32, B>

§

type Output = Fixed<u32, B>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
source§

impl<const B: u32> BitAnd<Fixed<u8, B>> for Fixed<u8, B>

§

type Output = Fixed<u8, B>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
source§

impl<const B: u32> BitAndAssign<Fixed<i16, B>> for Fixed<i16, B>

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl<const B: u32> BitAndAssign<Fixed<i32, B>> for Fixed<i32, B>

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl<const B: u32> BitAndAssign<Fixed<i8, B>> for Fixed<i8, B>

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl<const B: u32> BitAndAssign<Fixed<u16, B>> for Fixed<u16, B>

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl<const B: u32> BitAndAssign<Fixed<u32, B>> for Fixed<u32, B>

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl<const B: u32> BitAndAssign<Fixed<u8, B>> for Fixed<u8, B>

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl<const B: u32> BitOr<Fixed<i16, B>> for Fixed<i16, B>

§

type Output = Fixed<i16, B>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
source§

impl<const B: u32> BitOr<Fixed<i32, B>> for Fixed<i32, B>

§

type Output = Fixed<i32, B>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
source§

impl<const B: u32> BitOr<Fixed<i8, B>> for Fixed<i8, B>

§

type Output = Fixed<i8, B>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
source§

impl<const B: u32> BitOr<Fixed<u16, B>> for Fixed<u16, B>

§

type Output = Fixed<u16, B>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
source§

impl<const B: u32> BitOr<Fixed<u32, B>> for Fixed<u32, B>

§

type Output = Fixed<u32, B>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
source§

impl<const B: u32> BitOr<Fixed<u8, B>> for Fixed<u8, B>

§

type Output = Fixed<u8, B>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
source§

impl<const B: u32> BitOrAssign<Fixed<i16, B>> for Fixed<i16, B>

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl<const B: u32> BitOrAssign<Fixed<i32, B>> for Fixed<i32, B>

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl<const B: u32> BitOrAssign<Fixed<i8, B>> for Fixed<i8, B>

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl<const B: u32> BitOrAssign<Fixed<u16, B>> for Fixed<u16, B>

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl<const B: u32> BitOrAssign<Fixed<u32, B>> for Fixed<u32, B>

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl<const B: u32> BitOrAssign<Fixed<u8, B>> for Fixed<u8, B>

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl<const B: u32> BitXor<Fixed<i16, B>> for Fixed<i16, B>

§

type Output = Fixed<i16, B>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
source§

impl<const B: u32> BitXor<Fixed<i32, B>> for Fixed<i32, B>

§

type Output = Fixed<i32, B>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
source§

impl<const B: u32> BitXor<Fixed<i8, B>> for Fixed<i8, B>

§

type Output = Fixed<i8, B>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
source§

impl<const B: u32> BitXor<Fixed<u16, B>> for Fixed<u16, B>

§

type Output = Fixed<u16, B>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
source§

impl<const B: u32> BitXor<Fixed<u32, B>> for Fixed<u32, B>

§

type Output = Fixed<u32, B>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
source§

impl<const B: u32> BitXor<Fixed<u8, B>> for Fixed<u8, B>

§

type Output = Fixed<u8, B>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
source§

impl<const B: u32> BitXorAssign<Fixed<i16, B>> for Fixed<i16, B>

source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
source§

impl<const B: u32> BitXorAssign<Fixed<i32, B>> for Fixed<i32, B>

source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
source§

impl<const B: u32> BitXorAssign<Fixed<i8, B>> for Fixed<i8, B>

source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
source§

impl<const B: u32> BitXorAssign<Fixed<u16, B>> for Fixed<u16, B>

source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
source§

impl<const B: u32> BitXorAssign<Fixed<u32, B>> for Fixed<u32, B>

source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
source§

impl<const B: u32> BitXorAssign<Fixed<u8, B>> for Fixed<u8, B>

source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
source§

impl<I: Clone, const B: u32> Clone for Fixed<I, B>

source§

fn clone(&self) -> Fixed<I, B>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<const B: u32> Debug for Fixed<i16, B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<const B: u32> Debug for Fixed<i32, B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<const B: u32> Debug for Fixed<i8, B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<const B: u32> Debug for Fixed<u16, B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<const B: u32> Debug for Fixed<u32, B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<const B: u32> Debug for Fixed<u8, B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I: Default, const B: u32> Default for Fixed<I, B>

source§

fn default() -> Fixed<I, B>

Returns the “default value” for a type. Read more
source§

impl<const B: u32> Div<Fixed<i16, B>> for Fixed<i16, B>

§

type Output = Fixed<i16, B>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl<const B: u32> Div<Fixed<i32, B>> for Fixed<i32, B>

§

type Output = Fixed<i32, B>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl<const B: u32> Div<Fixed<i8, B>> for Fixed<i8, B>

§

type Output = Fixed<i8, B>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl<const B: u32> Div<Fixed<u16, B>> for Fixed<u16, B>

§

type Output = Fixed<u16, B>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl<const B: u32> Div<Fixed<u32, B>> for Fixed<u32, B>

§

type Output = Fixed<u32, B>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl<const B: u32> Div<Fixed<u8, B>> for Fixed<u8, B>

§

type Output = Fixed<u8, B>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl<const B: u32> DivAssign<Fixed<i16, B>> for Fixed<i16, B>

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl<const B: u32> DivAssign<Fixed<i32, B>> for Fixed<i32, B>

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl<const B: u32> DivAssign<Fixed<i8, B>> for Fixed<i8, B>

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl<const B: u32> DivAssign<Fixed<u16, B>> for Fixed<u16, B>

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl<const B: u32> DivAssign<Fixed<u32, B>> for Fixed<u32, B>

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl<const B: u32> DivAssign<Fixed<u8, B>> for Fixed<u8, B>

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl<I: Hash, const B: u32> Hash for Fixed<I, B>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<const B: u32> Mul<Fixed<i16, B>> for Fixed<i16, B>

§

type Output = Fixed<i16, B>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl<const B: u32> Mul<Fixed<i32, B>> for Fixed<i32, B>

§

type Output = Fixed<i32, B>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl<const B: u32> Mul<Fixed<i8, B>> for Fixed<i8, B>

§

type Output = Fixed<i8, B>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl<const B: u32> Mul<Fixed<u16, B>> for Fixed<u16, B>

§

type Output = Fixed<u16, B>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl<const B: u32> Mul<Fixed<u32, B>> for Fixed<u32, B>

§

type Output = Fixed<u32, B>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl<const B: u32> Mul<Fixed<u8, B>> for Fixed<u8, B>

§

type Output = Fixed<u8, B>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl<const B: u32> MulAssign<Fixed<i16, B>> for Fixed<i16, B>

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl<const B: u32> MulAssign<Fixed<i32, B>> for Fixed<i32, B>

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl<const B: u32> MulAssign<Fixed<i8, B>> for Fixed<i8, B>

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl<const B: u32> MulAssign<Fixed<u16, B>> for Fixed<u16, B>

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl<const B: u32> MulAssign<Fixed<u32, B>> for Fixed<u32, B>

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl<const B: u32> MulAssign<Fixed<u8, B>> for Fixed<u8, B>

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl<const B: u32> Neg for Fixed<i16, B>

§

type Output = Fixed<i16, B>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<const B: u32> Neg for Fixed<i32, B>

§

type Output = Fixed<i32, B>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<const B: u32> Neg for Fixed<i8, B>

§

type Output = Fixed<i8, B>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<const B: u32> Not for Fixed<i16, B>

§

type Output = Fixed<i16, B>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl<const B: u32> Not for Fixed<i32, B>

§

type Output = Fixed<i32, B>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl<const B: u32> Not for Fixed<i8, B>

§

type Output = Fixed<i8, B>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl<const B: u32> Not for Fixed<u16, B>

§

type Output = Fixed<u16, B>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl<const B: u32> Not for Fixed<u32, B>

§

type Output = Fixed<u32, B>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl<const B: u32> Not for Fixed<u8, B>

§

type Output = Fixed<u8, B>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl<I: Ord, const B: u32> Ord for Fixed<I, B>

source§

fn cmp(&self, other: &Fixed<I, B>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl<I: PartialEq, const B: u32> PartialEq<Fixed<I, B>> for Fixed<I, B>

source§

fn eq(&self, other: &Fixed<I, B>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<I: PartialOrd, const B: u32> PartialOrd<Fixed<I, B>> for Fixed<I, B>

source§

fn partial_cmp(&self, other: &Fixed<I, B>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<const B: u32> Rem<Fixed<i16, B>> for Fixed<i16, B>

§

type Output = Fixed<i16, B>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
source§

impl<const B: u32> Rem<Fixed<i32, B>> for Fixed<i32, B>

§

type Output = Fixed<i32, B>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
source§

impl<const B: u32> Rem<Fixed<i8, B>> for Fixed<i8, B>

§

type Output = Fixed<i8, B>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
source§

impl<const B: u32> Rem<Fixed<u16, B>> for Fixed<u16, B>

§

type Output = Fixed<u16, B>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
source§

impl<const B: u32> Rem<Fixed<u32, B>> for Fixed<u32, B>

§

type Output = Fixed<u32, B>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
source§

impl<const B: u32> Rem<Fixed<u8, B>> for Fixed<u8, B>

§

type Output = Fixed<u8, B>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
source§

impl<const B: u32> RemAssign<Fixed<i16, B>> for Fixed<i16, B>

source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
source§

impl<const B: u32> RemAssign<Fixed<i32, B>> for Fixed<i32, B>

source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
source§

impl<const B: u32> RemAssign<Fixed<i8, B>> for Fixed<i8, B>

source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
source§

impl<const B: u32> RemAssign<Fixed<u16, B>> for Fixed<u16, B>

source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
source§

impl<const B: u32> RemAssign<Fixed<u32, B>> for Fixed<u32, B>

source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
source§

impl<const B: u32> RemAssign<Fixed<u8, B>> for Fixed<u8, B>

source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
source§

impl<const B: u32> Shl<u32> for Fixed<i16, B>

§

type Output = Fixed<i16, B>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u32) -> Self::Output

Performs the << operation. Read more
source§

impl<const B: u32> Shl<u32> for Fixed<i32, B>

§

type Output = Fixed<i32, B>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u32) -> Self::Output

Performs the << operation. Read more
source§

impl<const B: u32> Shl<u32> for Fixed<i8, B>

§

type Output = Fixed<i8, B>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u32) -> Self::Output

Performs the << operation. Read more
source§

impl<const B: u32> Shl<u32> for Fixed<u16, B>

§

type Output = Fixed<u16, B>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u32) -> Self::Output

Performs the << operation. Read more
source§

impl<const B: u32> Shl<u32> for Fixed<u32, B>

§

type Output = Fixed<u32, B>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u32) -> Self::Output

Performs the << operation. Read more
source§

impl<const B: u32> Shl<u32> for Fixed<u8, B>

§

type Output = Fixed<u8, B>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u32) -> Self::Output

Performs the << operation. Read more
source§

impl<const B: u32> ShlAssign<u32> for Fixed<i16, B>

source§

fn shl_assign(&mut self, rhs: u32)

Performs the <<= operation. Read more
source§

impl<const B: u32> ShlAssign<u32> for Fixed<i32, B>

source§

fn shl_assign(&mut self, rhs: u32)

Performs the <<= operation. Read more
source§

impl<const B: u32> ShlAssign<u32> for Fixed<i8, B>

source§

fn shl_assign(&mut self, rhs: u32)

Performs the <<= operation. Read more
source§

impl<const B: u32> ShlAssign<u32> for Fixed<u16, B>

source§

fn shl_assign(&mut self, rhs: u32)

Performs the <<= operation. Read more
source§

impl<const B: u32> ShlAssign<u32> for Fixed<u32, B>

source§

fn shl_assign(&mut self, rhs: u32)

Performs the <<= operation. Read more
source§

impl<const B: u32> ShlAssign<u32> for Fixed<u8, B>

source§

fn shl_assign(&mut self, rhs: u32)

Performs the <<= operation. Read more
source§

impl<const B: u32> Shr<u32> for Fixed<i16, B>

§

type Output = Fixed<i16, B>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u32) -> Self::Output

Performs the >> operation. Read more
source§

impl<const B: u32> Shr<u32> for Fixed<i32, B>

§

type Output = Fixed<i32, B>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u32) -> Self::Output

Performs the >> operation. Read more
source§

impl<const B: u32> Shr<u32> for Fixed<i8, B>

§

type Output = Fixed<i8, B>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u32) -> Self::Output

Performs the >> operation. Read more
source§

impl<const B: u32> Shr<u32> for Fixed<u16, B>

§

type Output = Fixed<u16, B>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u32) -> Self::Output

Performs the >> operation. Read more
source§

impl<const B: u32> Shr<u32> for Fixed<u32, B>

§

type Output = Fixed<u32, B>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u32) -> Self::Output

Performs the >> operation. Read more
source§

impl<const B: u32> Shr<u32> for Fixed<u8, B>

§

type Output = Fixed<u8, B>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u32) -> Self::Output

Performs the >> operation. Read more
source§

impl<const B: u32> ShrAssign<u32> for Fixed<i16, B>

source§

fn shr_assign(&mut self, rhs: u32)

Performs the >>= operation. Read more
source§

impl<const B: u32> ShrAssign<u32> for Fixed<i32, B>

source§

fn shr_assign(&mut self, rhs: u32)

Performs the >>= operation. Read more
source§

impl<const B: u32> ShrAssign<u32> for Fixed<i8, B>

source§

fn shr_assign(&mut self, rhs: u32)

Performs the >>= operation. Read more
source§

impl<const B: u32> ShrAssign<u32> for Fixed<u16, B>

source§

fn shr_assign(&mut self, rhs: u32)

Performs the >>= operation. Read more
source§

impl<const B: u32> ShrAssign<u32> for Fixed<u32, B>

source§

fn shr_assign(&mut self, rhs: u32)

Performs the >>= operation. Read more
source§

impl<const B: u32> ShrAssign<u32> for Fixed<u8, B>

source§

fn shr_assign(&mut self, rhs: u32)

Performs the >>= operation. Read more
source§

impl<const B: u32> Sub<Fixed<i16, B>> for Fixed<i16, B>

§

type Output = Fixed<i16, B>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl<const B: u32> Sub<Fixed<i32, B>> for Fixed<i32, B>

§

type Output = Fixed<i32, B>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl<const B: u32> Sub<Fixed<i8, B>> for Fixed<i8, B>

§

type Output = Fixed<i8, B>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl<const B: u32> Sub<Fixed<u16, B>> for Fixed<u16, B>

§

type Output = Fixed<u16, B>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl<const B: u32> Sub<Fixed<u32, B>> for Fixed<u32, B>

§

type Output = Fixed<u32, B>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl<const B: u32> Sub<Fixed<u8, B>> for Fixed<u8, B>

§

type Output = Fixed<u8, B>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl<const B: u32> SubAssign<Fixed<i16, B>> for Fixed<i16, B>

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl<const B: u32> SubAssign<Fixed<i32, B>> for Fixed<i32, B>

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl<const B: u32> SubAssign<Fixed<i8, B>> for Fixed<i8, B>

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl<const B: u32> SubAssign<Fixed<u16, B>> for Fixed<u16, B>

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl<const B: u32> SubAssign<Fixed<u32, B>> for Fixed<u32, B>

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl<const B: u32> SubAssign<Fixed<u8, B>> for Fixed<u8, B>

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl<I: Copy, const B: u32> Copy for Fixed<I, B>

source§

impl<I: Eq, const B: u32> Eq for Fixed<I, B>

source§

impl<I: GbaCellSafe, const B: u32> GbaCellSafe for Fixed<I, B>

source§

impl<I, const B: u32> StructuralEq for Fixed<I, B>

source§

impl<I, const B: u32> StructuralPartialEq for Fixed<I, B>

Auto Trait Implementations§

§

impl<I, const B: u32> RefUnwindSafe for Fixed<I, B>where I: RefUnwindSafe,

§

impl<I, const B: u32> Send for Fixed<I, B>where I: Send,

§

impl<I, const B: u32> Sync for Fixed<I, B>where I: Sync,

§

impl<I, const B: u32> Unpin for Fixed<I, B>where I: Unpin,

§

impl<I, const B: u32> UnwindSafe for Fixed<I, B>where I: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.