numaxiom 0.0.2

Lightweight numeric marker traits for ranges/signs plus constants and ops; std by default, no_std optional.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Provides a negative infinity value via a method.
pub trait NegativeInfinity {
    fn negative_infinity() -> Self;
}

macro_rules! impl_negative_infinity_for_float_val {
    ($($ty:ty),+ $(,)?) => {
        $(impl NegativeInfinity for $ty {
            fn negative_infinity() -> Self {
                <$ty>::NEG_INFINITY
            }
        })+
    };
}

impl_negative_infinity_for_float_val!(f32, f64);