Struct fpa::Q [] [src]

pub struct Q<BITS, FRAC> { /* fields omitted */ }

Fixed point number

  • BITS is the integer primitive used to stored the number
  • FRAC is the number of bits used for the fractional part of the number

Methods

impl<FRAC> Q<i8, FRAC> where
    FRAC: Cmp<U0, Output = Greater> + Cmp<U8, Output = Less> + Unsigned
[src]

Creates a fixed point number from the bit pattern $bits

impl<FRAC> Q<i8, FRAC>
[src]

Returns the absolute value of self

Returns the bit pattern that represents self

impl<FRAC> Q<i16, FRAC> where
    FRAC: Cmp<U0, Output = Greater> + Cmp<U16, Output = Less> + Unsigned
[src]

Creates a fixed point number from the bit pattern $bits

impl<FRAC> Q<i16, FRAC>
[src]

Returns the absolute value of self

Returns the bit pattern that represents self

impl<FRAC> Q<i32, FRAC> where
    FRAC: Cmp<U0, Output = Greater> + Cmp<U32, Output = Less> + Unsigned
[src]

Creates a fixed point number from the bit pattern $bits

impl<FRAC> Q<i32, FRAC>
[src]

Returns the absolute value of self

Returns the bit pattern that represents self

Trait Implementations

impl<BITS, FRAC> Clone for Q<BITS, FRAC> where
    BITS: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<BITS, FRAC> Copy for Q<BITS, FRAC> where
    BITS: Copy
[src]

impl<BITS, FRAC> Eq for Q<BITS, FRAC> where
    BITS: Eq
[src]

impl<BITS, FRAC> Ord for Q<BITS, FRAC> where
    BITS: Ord
[src]

This method returns an Ordering between self and other. Read more

impl<BITS, FRAC> PartialEq for Q<BITS, FRAC> where
    BITS: PartialEq
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<BITS, FRAC> PartialOrd for Q<BITS, FRAC> where
    BITS: PartialOrd
[src]

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

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

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

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

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

impl<FRAC> From<f32> for Q<i8, FRAC> where
    FRAC: Cmp<U0, Output = Greater> + Cmp<U8, Output = Less> + Unsigned
[src]

The result of the cast operation: either Self or Result<Self, Error>

Checked cast from Src to Self

impl<FRAC> From<f64> for Q<i8, FRAC> where
    FRAC: Cmp<U0, Output = Greater> + Cmp<U8, Output = Less> + Unsigned
[src]

The result of the cast operation: either Self or Result<Self, Error>

Checked cast from Src to Self

impl<FRAC> From<Q<i8, FRAC>> for Q<i8, FRAC>
[src]

The result of the cast operation: either Self or Result<Self, Error>

Checked cast from Src to Self

impl<FRAC> Debug for Q<i8, FRAC>
[src]

Formats the value using the given formatter.

impl<FRAC> Display for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

Formats the value using the given formatter. Read more

impl<FRAC> Add for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the + operator

The method for the + operator

impl<FRAC> Add<i8> for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the + operator

The method for the + operator

impl<FRAC> AddAssign for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The method for the += operator

impl<FRAC> AddAssign<i8> for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The method for the += operator

impl<FRAC> Div for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the / operator

The method for the / operator

impl<FRAC> Div<i8> for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the / operator

The method for the / operator

impl<FRAC> DivAssign for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The method for the /= operator

impl<FRAC> DivAssign<i8> for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The method for the /= operator

impl<FRAC> Mul for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the * operator

The method for the * operator

impl<FRAC> Mul<i8> for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the * operator

The method for the * operator

impl<FRAC> MulAssign for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The method for the *= operator

impl<FRAC> MulAssign<i8> for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The method for the *= operator

impl<FRAC> Neg for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<FRAC> Shl<u8> for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the << operator

The method for the << operator

impl<FRAC> Shr<u8> for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl<FRAC> Sub for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the - operator

The method for the - operator

impl<FRAC> Sub<i8> for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the - operator

The method for the - operator

impl<FRAC> SubAssign for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The method for the -= operator

impl<FRAC> SubAssign<i8> for Q<i8, FRAC> where
    FRAC: Unsigned
[src]

The method for the -= operator

impl<FRAC> From<f32> for Q<i16, FRAC> where
    FRAC: Cmp<U0, Output = Greater> + Cmp<U16, Output = Less> + Unsigned
[src]

The result of the cast operation: either Self or Result<Self, Error>

Checked cast from Src to Self

impl<FRAC> From<f64> for Q<i16, FRAC> where
    FRAC: Cmp<U0, Output = Greater> + Cmp<U16, Output = Less> + Unsigned
[src]

The result of the cast operation: either Self or Result<Self, Error>

Checked cast from Src to Self

impl<FRAC> From<Q<i16, FRAC>> for Q<i16, FRAC>
[src]

The result of the cast operation: either Self or Result<Self, Error>

Checked cast from Src to Self

impl<FRAC> Debug for Q<i16, FRAC>
[src]

Formats the value using the given formatter.

impl<FRAC> Display for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

Formats the value using the given formatter. Read more

impl<FRAC> Add for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the + operator

The method for the + operator

impl<FRAC> Add<i16> for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the + operator

The method for the + operator

impl<FRAC> AddAssign for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The method for the += operator

impl<FRAC> AddAssign<i16> for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The method for the += operator

impl<FRAC> Div for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the / operator

The method for the / operator

impl<FRAC> Div<i16> for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the / operator

The method for the / operator

impl<FRAC> DivAssign for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The method for the /= operator

impl<FRAC> DivAssign<i16> for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The method for the /= operator

impl<FRAC> Mul for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the * operator

The method for the * operator

impl<FRAC> Mul<i16> for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the * operator

The method for the * operator

impl<FRAC> MulAssign for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The method for the *= operator

impl<FRAC> MulAssign<i16> for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The method for the *= operator

impl<FRAC> Neg for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<FRAC> Shl<u8> for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the << operator

The method for the << operator

impl<FRAC> Shr<u8> for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl<FRAC> Sub for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the - operator

The method for the - operator

impl<FRAC> Sub<i16> for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the - operator

The method for the - operator

impl<FRAC> SubAssign for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The method for the -= operator

impl<FRAC> SubAssign<i16> for Q<i16, FRAC> where
    FRAC: Unsigned
[src]

The method for the -= operator

impl<FRAC> From<f32> for Q<i32, FRAC> where
    FRAC: Cmp<U0, Output = Greater> + Cmp<U32, Output = Less> + Unsigned
[src]

The result of the cast operation: either Self or Result<Self, Error>

Checked cast from Src to Self

impl<FRAC> From<f64> for Q<i32, FRAC> where
    FRAC: Cmp<U0, Output = Greater> + Cmp<U32, Output = Less> + Unsigned
[src]

The result of the cast operation: either Self or Result<Self, Error>

Checked cast from Src to Self

impl<FRAC> From<Q<i32, FRAC>> for Q<i32, FRAC>
[src]

The result of the cast operation: either Self or Result<Self, Error>

Checked cast from Src to Self

impl<FRAC> Debug for Q<i32, FRAC>
[src]

Formats the value using the given formatter.

impl<FRAC> Display for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

Formats the value using the given formatter. Read more

impl<FRAC> Add for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the + operator

The method for the + operator

impl<FRAC> Add<i32> for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the + operator

The method for the + operator

impl<FRAC> AddAssign for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The method for the += operator

impl<FRAC> AddAssign<i32> for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The method for the += operator

impl<FRAC> Div for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the / operator

The method for the / operator

impl<FRAC> Div<i32> for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the / operator

The method for the / operator

impl<FRAC> DivAssign for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The method for the /= operator

impl<FRAC> DivAssign<i32> for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The method for the /= operator

impl<FRAC> Mul for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the * operator

The method for the * operator

impl<FRAC> Mul<i32> for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the * operator

The method for the * operator

impl<FRAC> MulAssign for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The method for the *= operator

impl<FRAC> MulAssign<i32> for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The method for the *= operator

impl<FRAC> Neg for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<FRAC> Shl<u8> for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the << operator

The method for the << operator

impl<FRAC> Shr<u8> for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl<FRAC> Sub for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the - operator

The method for the - operator

impl<FRAC> Sub<i32> for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The resulting type after applying the - operator

The method for the - operator

impl<FRAC> SubAssign for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The method for the -= operator

impl<FRAC> SubAssign<i32> for Q<i32, FRAC> where
    FRAC: Unsigned
[src]

The method for the -= operator