pub trait NegAssign {
    fn neg_assign(&mut self);
}
Expand description

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

Required Methods

Implementations on Foreign Types

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.

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.

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.

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.

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.

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.

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.

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