Expand description

Implementation of remainder and modulo as it is done in the Go standard library.

For unknown reasons the Rust standard methods as operator % or .rem_euclid() produce different results and azimuthal integration over the chi angle looks different. Thus we just copy the functions math.Remainder and math.Mod as they are, but changing them to be more idiomatic in Rust (i.e. as methods of f64). Since the Go methods internally use functions frexp and ldexp, we have to use crate glm which reproduces them in Rust.

We also copy the Go tests to be sure the calculations are equal.

Traits

Trait to be implemented by f64 and f32.