doc.rust-lang.org
pub const fn is_normal(self) -> bool
Returns true if the number is neither zero, infinite, subnormal, or NaN.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_nan(self) -> bool
Returns true if this value is NaN.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_infinite(self) -> bool
Returns true if this value is positive infinity or negative infinity, and false otherwise.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_finite(self) -> bool
Returns true if this number is neither infinite nor NaN.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_ne_bytes(bytes: [u8; 4]) -> Self
Creates a floating point value from its representation as a byte array in native endian.
associated_function
core
Stable since 1.40.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_le_bytes(bytes: [u8; 4]) -> Self
Creates a floating point value from its representation as a byte array in little endian.
associated_function
core
Stable since 1.40.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_bits(v: u32) -> Self
Raw transmutation from u32.
associated_function
core
Stable since 1.20.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_be_bytes(bytes: [u8; 4]) -> Self
Creates a floating point value from its representation as a byte array in big endian.
associated_function
core
Stable since 1.40.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn copysign(self, sign: f32) -> f32
Returns a number composed of the magnitude of self and the sign of sign.
method
core
Stable since 1.35.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const TAU: f32
The full circle constant (τ)
constant
core
Stable since 1.47.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const SQRT_2: f32
sqrt(2)
constant
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const PI: f32
Archimedes' constant (π)
constant
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const LOG2_E: f32
log2(e)
constant
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const LOG2_10: f32
log2(10)
constant
core
Stable since 1.43.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const LOG10_E: f32
log10(e)
constant
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const LOG10_2: f32
log10(2)
constant
core
Stable since 1.43.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const LN_2: f32
ln(2)
constant
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const LN_10: f32
ln(10)
constant
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const GOLDEN_RATIO: f32
The golden ratio (φ)
constant
core
Stable since 1.94.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const FRAC_PI_8: f32
π/8
constant
core
Stable since 1.0.0
Version 1.100.0-nightly