Struct lyon_core::fixed::Fp64 [] [src]

pub struct Fp64<F = _24> { /* fields omitted */ }

A 64 bits fixed point number. The size of the fractional is defined by the type parameter F.

Methods

impl<F: FractionalBits> Fp64<F>
[src]

[src]

Returns the internal representation.

This internal represenataion can be used for computations to avoid bit-shifting between each operation. The number of divisions should be equal to the number of multiplications performed in order to balance out the bit shifts that were skipped.

[src]

[src]

[src]

[src]

Smallest increment that can be reresented with this type.

[src]

Converts from a 32 bits floating point value.

[src]

Converts to a 32 bits floating point value.

[src]

Converts from a 64 bits floating point value.

[src]

Converts to a 64 bits floating point value.

[src]

Returns 1 if the number of positive, -1 if it is negative.

[src]

Returns the result of self % other.

[src]

Returns the lowest of the two values.

[src]

Returns the highest of the two values.

[src]

Returns the lowest and highest of the two values in order.

[src]

Returns the absolute value of this number.

[src]

Returns the same number with a different fractional precision.

impl<F: FractionalBits> Fp64<F>
[src]

[src]

[src]

[src]

Convert to an i64, truncating the fractional part

[src]

Computes the self * m / d in one go, avoid the precision loss from shifting bits back and forth.

[src]

Casts into a 32 bits fixed point number.

Trait Implementations

impl<F> Copy for Fp64<F>
[src]

impl<F> Clone for Fp64<F>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<F> PartialEq for Fp64<F>
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl<F> Eq for Fp64<F>
[src]

impl<F: FractionalBits> Debug for Fp64<F>
[src]

[src]

Formats the value using the given formatter.

impl<F: FractionalBits> Display for Fp64<F>
[src]

[src]

Formats the value using the given formatter. Read more

impl<F> Hash for Fp64<F>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<F: FractionalBits> PartialOrd for Fp64<F>
[src]

[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

impl<F: FractionalBits> Ord for Fp64<F>
[src]

[src]

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

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl<F: FractionalBits> Add<Fp64<F>> for Fp64<F>
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<F: FractionalBits> Sub<Fp64<F>> for Fp64<F>
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<F: FractionalBits> Mul<Fp64<F>> for Fp64<F>
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<F: FractionalBits> Neg for Fp64<F>
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl<F: FractionalBits> Mul<i64> for Fp64<F>
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<F: FractionalBits> Div<i64> for Fp64<F>
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<F: FractionalBits> AddAssign<Fp64<F>> for Fp64<F>
[src]

[src]

Performs the += operation.

impl<F: FractionalBits> SubAssign<Fp64<F>> for Fp64<F>
[src]

[src]

Performs the -= operation.

impl<F: FractionalBits> Into<f32> for Fp64<F>
[src]

[src]

Performs the conversion.

impl<F: FractionalBits> From<f32> for Fp64<F>
[src]

[src]

Performs the conversion.

impl<F: FractionalBits> Into<f64> for Fp64<F>
[src]

[src]

Performs the conversion.

impl<F: FractionalBits> From<f64> for Fp64<F>
[src]

[src]

Performs the conversion.

impl<F: FractionalBits> Div<Fp64<F>> for Fp64<F>
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.