pub trait Modulus {
    fn modulus(self, divisor: Self) -> Self;
}
Expand description

Provides a trait for the canonical modulus operation since % is technically the remainder operation

Required Methods

Performs a canonical modulus operation between self and divisor.

Examples
use statrs::euclid::Modulus;

let x = 4i64.modulus(5);
assert_eq!(x, 4);

let y = -4i64.modulus(5);
assert_eq!(x, 4);

Implementations on Foreign Types

Implementors