Trait malachite_base::num::arithmetic::traits::NegAssign

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

Replaces a number with its negative. Assumes the result is representable.

Required Methods§

source

fn neg_assign(&mut self)

Implementations on Foreign Types§

source§

impl NegAssign for f32

source§

fn neg_assign(&mut self)

Negates a number in place.

Assumes that the negative can be represented.

$x \gets -x$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl NegAssign for f64

source§

fn neg_assign(&mut self)

Negates a number in place.

Assumes that the negative can be represented.

$x \gets -x$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl NegAssign for i8

source§

fn neg_assign(&mut self)

Negates a number in place.

Assumes that the negative can be represented.

$x \gets -x$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl NegAssign for i16

source§

fn neg_assign(&mut self)

Negates a number in place.

Assumes that the negative can be represented.

$x \gets -x$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl NegAssign for i32

source§

fn neg_assign(&mut self)

Negates a number in place.

Assumes that the negative can be represented.

$x \gets -x$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl NegAssign for i64

source§

fn neg_assign(&mut self)

Negates a number in place.

Assumes that the negative can be represented.

$x \gets -x$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl NegAssign for i128

source§

fn neg_assign(&mut self)

Negates a number in place.

Assumes that the negative can be represented.

$x \gets -x$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl NegAssign for isize

source§

fn neg_assign(&mut self)

Negates a number in place.

Assumes that the negative can be represented.

$x \gets -x$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Implementors§