TruncDiv

Trait TruncDiv 

Source
pub trait TruncDiv<Rhs = Self> {
    type Output;

    // Required method
    fn div_trunc(self, rhs: Rhs) -> Self::Output;
}
Expand description

The TruncDiv trait defines an operator for truncated division, which discards the fractional part of the quotient, returning only the integer component. This differs from div_floor in that it truncates towards zero rather than towards negative infinity.

Required Associated Types§

Required Methods§

Source

fn div_trunc(self, rhs: Rhs) -> Self::Output

Implementors§

Source§

impl<T> TruncDiv for T
where T: Float,