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, DPI};
use std::ops::Rem;

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