Trait malachite_base::num::arithmetic::traits::SquareAssign
source · [−]pub trait SquareAssign {
fn square_assign(&mut self);
}
Expand description
Replaces a number with its square.
Required Methods
fn square_assign(&mut self)
Implementations on Foreign Types
sourceimpl SquareAssign for u8
impl SquareAssign for u8
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for u16
impl SquareAssign for u16
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for u32
impl SquareAssign for u32
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for u64
impl SquareAssign for u64
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for u128
impl SquareAssign for u128
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for usize
impl SquareAssign for usize
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for i8
impl SquareAssign for i8
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for i16
impl SquareAssign for i16
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for i32
impl SquareAssign for i32
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for i64
impl SquareAssign for i64
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for i128
impl SquareAssign for i128
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for isize
impl SquareAssign for isize
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for f32
impl SquareAssign for f32
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl SquareAssign for f64
impl SquareAssign for f64
sourcefn square_assign(&mut self)
fn square_assign(&mut self)
Squares a number in place.
$x \gets x^2$.
Worst-case complexity
Constant time and additional memory.
Examples
See here.