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
Associated Constants
const SCALING_FACTOR: Fraction
const SCALING_FACTOR: Fraction
The fractional scaling factor
Required methods
Provided methods
fn checked_mul(&self, rhs: &Self::T) -> Option<Self>
fn checked_mul(&self, rhs: &Self::T) -> Option<Self>
Multiply with overflow checking
fn checked_div(&self, rhs: &Self::T) -> Option<Self>
fn checked_div(&self, rhs: &Self::T) -> Option<Self>
Multiply with overflow checking