Trait embedded_time::fixed_point::FixedPoint[][src]

pub trait FixedPoint: Sized + Copy {
    type T: TimeInt;

    const SCALING_FACTOR: Fraction;

    fn integer(&self) -> Self::T;

    fn checked_mul(&self, rhs: &Self::T) -> Option<Self> { ... }
fn checked_div(&self, rhs: &Self::T) -> Option<Self> { ... }
fn min_value() -> Self::T { ... }
fn max_value() -> Self::T { ... } }
Expand description

Fixed-point value type

QX.32 where X: bit-width of T

Associated Types

The integer (magnitude) type

Associated Constants

The fractional scaling factor

Required methods

Returns the integer part of the FixedPoint value

assert_eq!(Hertz(45_u32).integer(), 45_u32);

Provided methods

Multiply with overflow checking

Multiply with overflow checking

Returns the minimum integer value

Returns the maximum integer value

Implementors