#[repr(transparent)]pub struct Float(_);Implementations§
source§impl Float
impl Float
pub const NEG_INFINITY: Self = _
pub const INFINITY: Self = _
pub const MIN: Self = _
pub const MAX: Self = _
pub const NAN: Self = _
pub fn new(f: f32) -> Self
sourcepub fn is_infinite(&self) -> bool
pub fn is_infinite(&self) -> bool
Returns true if this value is positive infinity or negative infinity, and false otherwise.
sourcepub fn is_positive(&self) -> bool
pub fn is_positive(&self) -> bool
Returns true if self has a positive sign, including +0.0, NaNs with
positive sign bit and positive infinity.
Note that IEEE 754 doesn’t assign any meaning to the sign bit in case
of a NaN, and as Rust doesn’t guarantee that the bit pattern of NaNs
are conserved over arithmetic operations, the result of
is_positive on a NaN might produce an unexpected result in some
cases.
See explanation of NaN as a special value
for more info.
sourcepub fn is_negative(&self) -> bool
pub fn is_negative(&self) -> bool
Returns false if self has a negative sign, including -0.0, NaNs with
negative sign bit and negative infinity.
Note that IEEE 754 doesn’t assign any meaning to the sign bit in case
of a NaN, and as Rust doesn’t guarantee that the bit pattern of NaNs
are conserved over arithmetic operations, the result of
is_negative on a NaN might produce an unexpected result in some
cases.
See explanation of NaN as a special value
for more info.
Trait Implementations§
source§impl LexicalFormOf<Float> for Float
impl LexicalFormOf<Float> for Float
type ValueError = Infallible
fn try_as_value(&self) -> Result<Float, Self::ValueError>
source§impl Ord for Float
impl Ord for Float
source§impl ParseRdf for Float
impl ParseRdf for Float
type LexicalForm = Float
fn parse_rdf(lexical_value: &str) -> ParseRdfResult<Self, Self::LexicalForm>
source§impl PartialEq<Float> for Float
impl PartialEq<Float> for Float
source§impl PartialOrd<Float> for Float
impl PartialOrd<Float> for Float
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more