pub trait Fixed16: Fixed {
type Widened: Fixed;
const ONE_OR_MAX: Self = _;
// Required methods
fn multiply_fixed(self, rhs: Self) -> Self;
fn scale_fixed(self, rhs: ScalarFxP) -> Self;
fn widen(self) -> Self::Widened;
fn widened_from_bits(bits: i32) -> Self::Widened;
}
Expand description
A trait encompassing 16 bit fixed point numbers along with a couple of convenience methods for the type.
Required Associated Types§
Provided Associated Constants§
sourceconst ONE_OR_MAX: Self = _
const ONE_OR_MAX: Self = _
The value one, or if one is not representable, the maximum representable by the type
Required Methods§
sourcefn multiply_fixed(self, rhs: Self) -> Self
fn multiply_fixed(self, rhs: Self) -> Self
Multiply two fixed point numbers
sourcefn scale_fixed(self, rhs: ScalarFxP) -> Self
fn scale_fixed(self, rhs: ScalarFxP) -> Self
Scale a fixed point number
sourcefn widened_from_bits(bits: i32) -> Self::Widened
fn widened_from_bits(bits: i32) -> Self::Widened
Create a widened from bits
Object Safety§
This trait is not object safe.