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§
source§impl WrappingAddAssign<u8> for u8
impl WrappingAddAssign<u8> for u8
source§fn 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.
source§impl WrappingAddAssign<u16> for u16
impl WrappingAddAssign<u16> for u16
source§fn 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.
source§impl WrappingAddAssign<u32> for u32
impl WrappingAddAssign<u32> for u32
source§fn 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.
source§impl WrappingAddAssign<u64> for u64
impl WrappingAddAssign<u64> for u64
source§fn 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.
source§impl WrappingAddAssign<u128> for u128
impl WrappingAddAssign<u128> for u128
source§fn 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.
source§impl WrappingAddAssign<usize> for usize
impl WrappingAddAssign<usize> for usize
source§fn 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.
source§impl WrappingAddAssign<i8> for i8
impl WrappingAddAssign<i8> for i8
source§fn 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.
source§impl WrappingAddAssign<i16> for i16
impl WrappingAddAssign<i16> for i16
source§fn 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.
source§impl WrappingAddAssign<i32> for i32
impl WrappingAddAssign<i32> for i32
source§fn 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.
source§impl WrappingAddAssign<i64> for i64
impl WrappingAddAssign<i64> for i64
source§fn 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.
source§impl WrappingAddAssign<i128> for i128
impl WrappingAddAssign<i128> for i128
source§fn 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.
source§impl WrappingAddAssign<isize> for isize
impl WrappingAddAssign<isize> for isize
source§fn 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.