Trait malachite_base::num::arithmetic::traits::AbsAssign

source ·
pub trait AbsAssign {
    // Required method
    fn abs_assign(&mut self);
}
Expand description

Replaces a number with its absolute value. Assumes that the number has a representable absolute number.

Required Methods§

source

fn abs_assign(&mut self)

Implementations on Foreign Types§

source§

impl AbsAssign for f32

source§

fn abs_assign(&mut self)

Replaces a number with its absolute value.

$x \gets |x|$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl AbsAssign for f64

source§

fn abs_assign(&mut self)

Replaces a number with its absolute value.

$x \gets |x|$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl AbsAssign for i8

source§

fn abs_assign(&mut self)

Replaces a number with its absolute value.

$x \gets |x|$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl AbsAssign for i16

source§

fn abs_assign(&mut self)

Replaces a number with its absolute value.

$x \gets |x|$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl AbsAssign for i32

source§

fn abs_assign(&mut self)

Replaces a number with its absolute value.

$x \gets |x|$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl AbsAssign for i64

source§

fn abs_assign(&mut self)

Replaces a number with its absolute value.

$x \gets |x|$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl AbsAssign for i128

source§

fn abs_assign(&mut self)

Replaces a number with its absolute value.

$x \gets |x|$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl AbsAssign for isize

source§

fn abs_assign(&mut self)

Replaces a number with its absolute value.

$x \gets |x|$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Implementors§