Trait 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§