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
/// Marker for types that can represent machine epsilon.
/// Implementers must ensure an epsilon value is representable.
pub trait HasEpsilon {}

macro_rules! impl_has_epsilon_for_float {
    ($($ty:ty),+ $(,)?) => {
        $(impl HasEpsilon for $ty {})+
    };
}

impl_has_epsilon_for_float!(f32, f64);