Trait malachite_base::num::arithmetic::traits::AbsDiffAssign

source ·
pub trait AbsDiffAssign<RHS = Self> {
    // Required method
    fn abs_diff_assign(&mut self, other: RHS);
}
Expand description

Replaces a number with the absolute value of its difference with another number.

Required Methods§

source

fn abs_diff_assign(&mut self, other: RHS)

Implementations on Foreign Types§

source§

impl AbsDiffAssign for u8

source§

fn abs_diff_assign(&mut self, other: u8)

Subtracts a number by another and takes the absolute value, in place. The output type is the unsigned type with the same width.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl AbsDiffAssign for u16

source§

fn abs_diff_assign(&mut self, other: u16)

Subtracts a number by another and takes the absolute value, in place. The output type is the unsigned type with the same width.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl AbsDiffAssign for u32

source§

fn abs_diff_assign(&mut self, other: u32)

Subtracts a number by another and takes the absolute value, in place. The output type is the unsigned type with the same width.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl AbsDiffAssign for u64

source§

fn abs_diff_assign(&mut self, other: u64)

Subtracts a number by another and takes the absolute value, in place. The output type is the unsigned type with the same width.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl AbsDiffAssign for u128

source§

fn abs_diff_assign(&mut self, other: u128)

Subtracts a number by another and takes the absolute value, in place. The output type is the unsigned type with the same width.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl AbsDiffAssign for usize

source§

fn abs_diff_assign(&mut self, other: usize)

Subtracts a number by another and takes the absolute value, in place. The output type is the unsigned type with the same width.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Implementors§