Trait malachite_base::num::arithmetic::traits::WrappingNegAssign
source · [−]pub trait WrappingNegAssign {
fn wrapping_neg_assign(&mut self);
}
Expand description
Negates a number in place, wrapping around at the boundary of the type.
Required Methods
fn wrapping_neg_assign(&mut self)
Implementations on Foreign Types
sourceimpl WrappingNegAssign for u8
impl WrappingNegAssign for u8
sourcefn wrapping_neg_assign(&mut self)
fn wrapping_neg_assign(&mut self)
Negates a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv -x \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingNegAssign for u16
impl WrappingNegAssign for u16
sourcefn wrapping_neg_assign(&mut self)
fn wrapping_neg_assign(&mut self)
Negates a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv -x \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingNegAssign for u32
impl WrappingNegAssign for u32
sourcefn wrapping_neg_assign(&mut self)
fn wrapping_neg_assign(&mut self)
Negates a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv -x \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingNegAssign for u64
impl WrappingNegAssign for u64
sourcefn wrapping_neg_assign(&mut self)
fn wrapping_neg_assign(&mut self)
Negates a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv -x \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingNegAssign for u128
impl WrappingNegAssign for u128
sourcefn wrapping_neg_assign(&mut self)
fn wrapping_neg_assign(&mut self)
Negates a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv -x \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingNegAssign for usize
impl WrappingNegAssign for usize
sourcefn wrapping_neg_assign(&mut self)
fn wrapping_neg_assign(&mut self)
Negates a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv -x \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingNegAssign for i8
impl WrappingNegAssign for i8
sourcefn wrapping_neg_assign(&mut self)
fn wrapping_neg_assign(&mut self)
Negates a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv -x \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingNegAssign for i16
impl WrappingNegAssign for i16
sourcefn wrapping_neg_assign(&mut self)
fn wrapping_neg_assign(&mut self)
Negates a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv -x \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingNegAssign for i32
impl WrappingNegAssign for i32
sourcefn wrapping_neg_assign(&mut self)
fn wrapping_neg_assign(&mut self)
Negates a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv -x \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingNegAssign for i64
impl WrappingNegAssign for i64
sourcefn wrapping_neg_assign(&mut self)
fn wrapping_neg_assign(&mut self)
Negates a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv -x \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingNegAssign for i128
impl WrappingNegAssign for i128
sourcefn wrapping_neg_assign(&mut self)
fn wrapping_neg_assign(&mut self)
Negates a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv -x \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl WrappingNegAssign for isize
impl WrappingNegAssign for isize
sourcefn wrapping_neg_assign(&mut self)
fn wrapping_neg_assign(&mut self)
Negates a number in place, wrapping around at the boundary of the type.
$x \gets y$, where $y \equiv -x \mod 2^W$ and $W$ is Self::WIDTH
.
Worst-case complexity
Constant time and additional memory.
Examples
See here.