sofars 0.6.0

Pure Rust implementation of the IAU SOFA library
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::consts::D2PI;
use std::ops::Rem;

/// Normalize angle into the range 0 <= a < 2pi.
pub fn anp(a: f64) -> f64 {
    let mut w = a.rem(D2PI);
    if w < 0.0 {
        w += D2PI;
    }
    w
}