pub trait Modulus { // Required method fn modulus(self, divisor: Self) -> Self; }
Provides a trait for the canonical modulus operation since % is technically the remainder operation
Performs a canonical modulus operation between self and divisor.
self
divisor
use statrs::euclid::Modulus; let x = 4i64.modulus(5); assert_eq!(x, 4); let y = -4i64.modulus(5); assert_eq!(x, 4);