pub struct F32(_);
Expand description

A NaN preserving f32 type.

Implementations§

source§

impl F32

source

pub fn from_bits(other: u32) -> F32

source

pub fn to_bits(self) -> u32

source

pub fn from_float(fl: f32) -> F32

source

pub fn to_float(self) -> f32

source

pub fn is_nan(self) -> bool

source

pub fn abs(self) -> F32

source

pub fn fract(self) -> F32

source

pub fn min(self, other: F32) -> F32

source

pub fn max(self, other: F32) -> F32

Trait Implementations§

source§

impl<T> Add<T> for F32where T: Into<F32>,

§

type Output = F32

The resulting type after applying the + operator.
source§

fn add(self, other: T) -> F32

Performs the + operation. Read more
source§

impl ArithmeticOps<F32> for F32

source§

fn add(self, other: F32) -> F32

Add two values.
source§

fn sub(self, other: F32) -> F32

Subtract two values.
source§

fn mul(self, other: F32) -> F32

Multiply two values.
source§

fn div(self, other: F32) -> Result<F32, TrapCode>

Divide two values.
source§

impl Clone for F32

source§

fn clone(&self) -> F32

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for F32

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> Div<T> for F32where T: Into<F32>,

§

type Output = F32

The resulting type after applying the / operator.
source§

fn div(self, other: T) -> F32

Performs the / operation. Read more
source§

impl ExtendInto<F32> for i32

source§

fn extend_into(self) -> F32

Convert one type to another by extending with leading zeroes.
source§

impl ExtendInto<F32> for u32

source§

fn extend_into(self) -> F32

Convert one type to another by extending with leading zeroes.
source§

impl ExtendInto<F64> for F32

source§

fn extend_into(self) -> F64

Convert one type to another by extending with leading zeroes.
source§

impl Float<F32> for F32

source§

fn abs(self) -> F32

Get absolute value.
source§

fn floor(self) -> F32

Returns the largest integer less than or equal to a number.
source§

fn ceil(self) -> F32

Returns the smallest integer greater than or equal to a number.
source§

fn trunc(self) -> F32

Returns the integer part of a number.
source§

fn round(self) -> F32

Returns the nearest integer to a number. Round half-way cases away from 0.0.
source§

fn nearest(self) -> F32

Returns the nearest integer to a number. Ties are round to even number.
source§

fn sqrt(self) -> F32

Takes the square root of a number.
source§

fn is_sign_positive(self) -> bool

Returns true if the sign of the number is positive.
source§

fn is_sign_negative(self) -> bool

Returns true if the sign of the number is negative.
source§

fn min(self, other: F32) -> F32

Returns the minimum of the two numbers.
source§

fn max(self, other: F32) -> F32

Returns the maximum of the two numbers.
source§

fn copysign(self, other: F32) -> F32

Sets sign of this value to the sign of other value.
source§

impl From<F32> for Value

source§

fn from(val: F32) -> Value

Converts to this type from the input type.
source§

impl From<UntypedValue> for F32

source§

fn from(untyped: UntypedValue) -> F32

Converts to this type from the input type.
source§

impl From<f32> for F32

source§

fn from(other: f32) -> F32

Converts to this type from the input type.
source§

impl From<u32> for F32

source§

fn from(other: u32) -> F32

Converts to this type from the input type.
source§

impl FromValue for F32

source§

fn from_value(val: Value) -> Option<F32>

Create a value of type Self from a given Value. Read more
source§

impl LittleEndianConvert for F32

§

type Bytes = <u32 as LittleEndianConvert>::Bytes

The little endian bytes representation.
source§

fn into_le_bytes(self) -> <F32 as LittleEndianConvert>::Bytes

Converts self into little endian bytes.
source§

fn from_le_bytes(bytes: <F32 as LittleEndianConvert>::Bytes) -> F32

Converts little endian bytes into Self.
source§

impl<T> Mul<T> for F32where T: Into<F32>,

§

type Output = F32

The resulting type after applying the * operator.
source§

fn mul(self, other: T) -> F32

Performs the * operation. Read more
source§

impl Neg for F32

§

type Output = F32

The resulting type after applying the - operator.
source§

fn neg(self) -> F32

Performs the unary - operation. Read more
source§

impl<T> PartialEq<T> for F32where T: Into<F32> + Copy,

source§

fn eq(&self, other: &T) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T> PartialOrd<T> for F32where T: Into<F32> + Copy,

source§

fn partial_cmp(&self, other: &T) -> Option<Ordering>

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

fn lt(&self, other: &Rhs) -> bool

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

fn le(&self, other: &Rhs) -> bool

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

fn gt(&self, other: &Rhs) -> bool

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

fn ge(&self, other: &Rhs) -> bool

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

impl<T> Rem<T> for F32where T: Into<F32>,

§

type Output = F32

The resulting type after applying the % operator.
source§

fn rem(self, other: T) -> F32

Performs the % operation. Read more
source§

impl<T> Sub<T> for F32where T: Into<F32>,

§

type Output = F32

The resulting type after applying the - operator.
source§

fn sub(self, other: T) -> F32

Performs the - operation. Read more
source§

impl TransmuteInto<F32> for F32

source§

fn transmute_into(self) -> F32

Reinterprets the bits of a value of one type as another type.
source§

impl TransmuteInto<F32> for f32

source§

fn transmute_into(self) -> F32

Reinterprets the bits of a value of one type as another type.
source§

impl TransmuteInto<F32> for i32

source§

fn transmute_into(self) -> F32

Reinterprets the bits of a value of one type as another type.
source§

impl TransmuteInto<F32> for u32

source§

fn transmute_into(self) -> F32

Reinterprets the bits of a value of one type as another type.
source§

impl TransmuteInto<f32> for F32

source§

fn transmute_into(self) -> f32

Reinterprets the bits of a value of one type as another type.
source§

impl TransmuteInto<i32> for F32

source§

fn transmute_into(self) -> i32

Reinterprets the bits of a value of one type as another type.
source§

impl TransmuteInto<u32> for F32

source§

fn transmute_into(self) -> u32

Reinterprets the bits of a value of one type as another type.
source§

impl TruncateSaturateInto<i32> for F32

source§

fn truncate_saturate_into(self) -> i32

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TruncateSaturateInto<i64> for F32

source§

fn truncate_saturate_into(self) -> i64

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TruncateSaturateInto<u32> for F32

source§

fn truncate_saturate_into(self) -> u32

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TruncateSaturateInto<u64> for F32

source§

fn truncate_saturate_into(self) -> u64

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TryTruncateInto<i32, TrapCode> for F32

source§

fn try_truncate_into(self) -> Result<i32, TrapCode>

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TryTruncateInto<i64, TrapCode> for F32

source§

fn try_truncate_into(self) -> Result<i64, TrapCode>

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TryTruncateInto<u32, TrapCode> for F32

source§

fn try_truncate_into(self) -> Result<u32, TrapCode>

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl TryTruncateInto<u64, TrapCode> for F32

source§

fn try_truncate_into(self) -> Result<u64, TrapCode>

Convert one type to another by rounding to the nearest integer towards zero.
source§

impl WrapInto<F32> for F64

source§

fn wrap_into(self) -> F32

Convert one type to another by wrapping.
source§

impl WrapInto<F32> for i64

source§

fn wrap_into(self) -> F32

Convert one type to another by wrapping.
source§

impl WrapInto<F32> for u64

source§

fn wrap_into(self) -> F32

Convert one type to another by wrapping.
source§

impl Copy for F32

Auto Trait Implementations§

§

impl RefUnwindSafe for F32

§

impl Send for F32

§

impl Sync for F32

§

impl Unpin for F32

§

impl UnwindSafe for F32

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T1> DecodeUntypedSlice for T1where T1: From<UntypedValue>,

source§

fn decode_untyped_slice(results: &[UntypedValue]) -> Result<T1, UntypedError>

Decodes the slice of UntypedValue as a value of type Self. Read more
source§

impl<T> Downcast for Twhere T: Any,

source§

fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> DowncastSync for Twhere T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T1> EncodeUntypedSlice for T1where T1: Into<UntypedValue>,

source§

fn encode_untyped_slice( self, results: &mut [UntypedValue] ) -> Result<(), UntypedError>

Encodes the slice of UntypedValue from the given value of type Self. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for Twhere T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,