doc.rust-lang.org
pub mod f64
Constants for the f64 double-precision floating point type.
module
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering
Returns the ordering between self and other.
method
core
Stable since 1.62.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_radians(self) -> f32
Converts degrees to radians.
method
core
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_ne_bytes(self) -> [u8; 4]
Returns the memory representation of this floating point number as a byte array in native byte order.
method
core
Stable since 1.40.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_le_bytes(self) -> [u8; 4]
Returns the memory representation of this floating point number as a byte array in little-endian byte order.
method
core
Stable since 1.40.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn to_int_unchecked<Int>(self) -> Int
Rounds toward zero and converts to any primitive integer type, assuming that the value is finite and fits in that type.
method
core
Stable since 1.44.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_degrees(self) -> f32
Converts radians to degrees.
method
core
Stable since 1.7.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_bits(self) -> u32
Raw transmutation to u32.
method
core
Stable since 1.20.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn to_be_bytes(self) -> [u8; 4]
Returns the memory representation of this floating point number as a byte array in big-endian (network) byte order.
method
core
Stable since 1.40.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn signum(self) -> f32
Returns a number that represents the sign of self.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn recip(self) -> f32
Takes the reciprocal (inverse) of a number, 1/x.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn next_up(self) -> Self
Returns the least number greater than self.
method
core
Stable since 1.86.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn next_down(self) -> Self
Returns the greatest number less than self.
method
core
Stable since 1.86.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn min(self, other: f32) -> f32
Returns the minimum of the two numbers, ignoring NaN.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn midpoint(self, other: f32) -> f32
Calculates the midpoint (average) between self and rhs.
method
core
Stable since 1.85.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn max(self, other: f32) -> f32
Returns the maximum of the two numbers, ignoring NaN.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn abs_sub(x: f32, other: f32) -> f32
Experimental version of abs_sub in core. See f32::abs_sub for details.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_subnormal(self) -> bool
Returns true if the number is subnormal.
method
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_sign_positive(self) -> bool
Returns true if self has a positive sign, including +0.0, NaNs with positive sign bit and positive infinity.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_sign_negative(self) -> bool
Returns true if self has a negative sign, including -0.0, NaNs with negative sign bit and negative infinity.
method
core
Stable since 1.0.0
Version 1.100.0-nightly