numaxiom 0.0.2

Lightweight numeric marker traits for ranges/signs plus constants and ops; std by default, no_std optional.
Documentation
use super::HasEpsilon;

/// Provides machine epsilon as a method.
pub trait Epsilon: HasEpsilon {
    fn epsilon() -> Self;
}

macro_rules! impl_epsilon_for_float {
    ($($ty:ty),+ $(,)?) => {
        $(
            impl Epsilon for $ty {
                fn epsilon() -> Self {
                    <$ty>::EPSILON
                }
            }
        )+
    };
}

impl_epsilon_for_float!(f32, f64);