Skip to main content

NumExt

Trait NumExt 

Source
pub trait NumExt {
    // Required methods
    fn div_ceil(self, other: Self) -> Self;
    fn div_floor(self, other: Self) -> Self;
}
Expand description

Additional operations on integers.

Required Methods§

Source

fn div_ceil(self, other: Self) -> Self

Division with rounding up.

Source

fn div_floor(self, other: Self) -> Self

Division with rounding down.

Note this is different from truncating, which is rounding toward zero.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl NumExt for i32

Source§

fn div_ceil(self, other: Self) -> Self

Source§

fn div_floor(self, other: Self) -> Self

Source§

impl NumExt for i64

Source§

fn div_ceil(self, other: Self) -> Self

Source§

fn div_floor(self, other: Self) -> Self

Implementors§