Trait malachite_base::num::arithmetic::traits::OverflowingAbsAssign
source · [−]pub trait OverflowingAbsAssign {
fn overflowing_abs_assign(&mut self) -> bool;
}
Expand description
Replaces a number with its absolute value.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped number is assigned.
Required Methods
fn overflowing_abs_assign(&mut self) -> bool
Implementations on Foreign Types
sourceimpl OverflowingAbsAssign for i8
impl OverflowingAbsAssign for i8
sourcefn overflowing_abs_assign(&mut self) -> bool
fn overflowing_abs_assign(&mut self) -> bool
Replaces a number with its absolute value.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingAbsAssign for i16
impl OverflowingAbsAssign for i16
sourcefn overflowing_abs_assign(&mut self) -> bool
fn overflowing_abs_assign(&mut self) -> bool
Replaces a number with its absolute value.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingAbsAssign for i32
impl OverflowingAbsAssign for i32
sourcefn overflowing_abs_assign(&mut self) -> bool
fn overflowing_abs_assign(&mut self) -> bool
Replaces a number with its absolute value.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingAbsAssign for i64
impl OverflowingAbsAssign for i64
sourcefn overflowing_abs_assign(&mut self) -> bool
fn overflowing_abs_assign(&mut self) -> bool
Replaces a number with its absolute value.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingAbsAssign for i128
impl OverflowingAbsAssign for i128
sourcefn overflowing_abs_assign(&mut self) -> bool
fn overflowing_abs_assign(&mut self) -> bool
Replaces a number with its absolute value.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingAbsAssign for isize
impl OverflowingAbsAssign for isize
sourcefn overflowing_abs_assign(&mut self) -> bool
fn overflowing_abs_assign(&mut self) -> bool
Replaces a number with its absolute value.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.