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