Trait statrs::euclid::Modulus[][src]

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

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

Required methods

fn modulus(self, divisor: Self) -> Self[src]

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);
Loading content...

Implementations on Foreign Types

impl Modulus for f64[src]

impl Modulus for f32[src]

impl Modulus for i64[src]

impl Modulus for i32[src]

impl Modulus for u64[src]

impl Modulus for u32[src]

Loading content...

Implementors

Loading content...