deep-time 0.1.0-beta.3

High-precision, no-std, no-alloc date-time library, leap-seconds, time scales, relativistic time, and a powerful date & duration parser
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::Real;

/// const friendly rem euclid function for float.
pub const fn rem_euclid_f(lhs: Real, rhs: Real) -> Real {
    let r = lhs % rhs;
    if r < f!(0.0) {
        if rhs > f!(0.0) { r + rhs } else { r - rhs }
    } else {
        r
    }
}