#[repr(transparent)]
pub struct FixedI64<Fract>(pub FixedI64<Fract>);
Expand description

Signed fixed-point number with a generic number of bits for the fractional part.

Tuple Fields

0: FixedI64<Fract>

Implementations

Creates a fixed-point number from another number.

Creates a fixed-point number that has a bitwise representation identical to the given integer.

Creates an integer that has a bitwise representation identical to the given fixed-point number.

Trait Implementations

Used for specifying relative comparisons.
The default tolerance to use when testing values that are close together. Read more
A test for equality that uses the absolute difference to compute the approximate equality of two numbers. Read more
The inverse of AbsDiffEq::abs_diff_eq.
The resulting type after applying the + operator.
Performs the + operation. Read more
Performs the += operation. Read more
Returns the smallest finite number this type can represent
Returns the largest finite number this type can represent
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Builds a pure-real complex number from the given value.
The real part of this complex number.
The imaginary part of this complex number.
The sum of the absolute value of this complex number’s real and imaginary part.
The modulus of this complex number.
The squared modulus of this complex number.
The argument of this complex number.
The exponential form of this complex number: (modulus, e^{i arg})
Multiplies this complex number by factor.
Divides this complex number by factor.
The absolute value of this complex number: self / self.signum(). Read more
The exponential part of this complex number: self / self.modulus()
Computes (self.conjugate() * self + other.conjugate() * other).sqrt()
The polar form of this complex number: (modulus, arg)
Cardinal sine
Cardinal cos
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
Generate a random value of T, using rng as the source of randomness.
Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Generate a random value of T, using rng as the source of randomness.
Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
The resulting type after applying the - operator.
Performs the unary - operation. Read more
Convert from a string and radix (typically 2..=36). Read more
Returns the multiplicative identity element of Self, 1. Read more
Sets self to the multiplicative identity element of Self, 1.
Returns true if self is equal to the multiplicative identity. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
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

Archimedes’ constant.

2.0 * pi.

pi / 2.0.

pi / 3.0.

pi / 4.0.

pi / 6.0.

pi / 8.0.

1.0 / pi.

2.0 / pi.

2.0 / sqrt(pi).

Euler’s number.

log2(e).

log10(e).

ln(2.0).

ln(10.0).

Is the sign of this real number positive?
Is the sign of this real number negative?
Copies the sign of sign to self. Read more
The smallest finite positive value representable using this type.
The largest finite positive value representable using this type.
The default relative tolerance for testing values that are far-apart. Read more
A test for equality that uses a relative comparison if the values are far apart.
The inverse of RelativeEq::relative_eq.
The resulting type after applying the % operator.
Performs the % operation. Read more
The resulting type after applying the % operator.
Performs the % operation. Read more
Performs the %= operation. Read more
Performs the %= operation. Read more
Serialize this value into the given Serde serializer. Read more
Computes the absolute value. Read more
The positive difference of two numbers. Read more
Returns the sign of the number. Read more
Returns true if the number is positive and false if the number is zero or negative.
Returns true if the number is negative and false if the number is zero or positive.
The type of the elements of each lane of this SIMD value.
Type of the result of comparing two SIMD values like self.
The number of lanes of this SIMD value.
Initializes an SIMD value with each lanes set to val.
Extracts the i-th lane of self. Read more
Extracts the i-th lane of self without bound-checking.
Replaces the i-th lane of self by val. Read more
Replaces the i-th lane of self by val without bound-checking.
Merges self and other depending on the lanes of cond. Read more
Applies a function to each lane of self. Read more
Applies a function to each lane of self paired with the corresponding lane of b. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
Performs the -= operation. Read more
The inclusion map: converts self to the equivalent element of its superset.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Use with care! Same as self.to_superset but without any property checks. Always succeeds.
Checks if element is actually part of the subset Self (and can be converted to it).
The inclusion map: converts self to the equivalent element of its superset.
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Use with care! Same as self.to_superset but without any property checks. Always succeeds.
Checks if element is actually part of the subset Self (and can be converted to it).
The default ULPs to tolerate when testing values that are far-apart. Read more
A test for equality that uses units in the last place (ULP) if the values are far apart.
The inverse of UlpsEq::ulps_eq.
Returns the additive identity element of Self, 0. Read more
Returns true if self is equal to the additive identity.
Sets self to the additive identity element of Self, 0.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Casts the value.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Numeric cast from self to T.
Casts the value.
Casts the value.
Casts the value.
Deserializes using the given deserializer

Returns the argument unchanged.

Safe lossless bitwise transmute from T to Self.
Numeric cast from T to Self.

Calls U::from(self).

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

Safe lossless bitwise transmute from self to T.
Performs the conversion.
Performs the conversion.
Returns the smallest finite number this type can represent
Casts the value.
Casts the value.
The type for metadata in pointers and references to Self.
Should always be Self
Casts the value.
Casts the value.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Casts the value.
Casts the value.
Returns the largest finite number this type can represent
Casts the value.
Casts the value.