pub trait NegAssign {
// Required method
fn neg_assign(&mut self);
}
Expand description
Replaces a number with its negative. Assumes the result is representable.
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.