Trait FloorSqrtAssign

Source
pub trait FloorSqrtAssign {
    // Required method
    fn floor_sqrt_assign(&mut self);
}
Expand description

Replaces a number with the floor of its square root.

Required Methods§

Implementations on Foreign Types§

Source§

impl FloorSqrtAssign for i8

Source§

fn floor_sqrt_assign(&mut self)

Replaces an integer with the floor of its square root.

$x \gets \lfloor\sqrt{x}\rfloor$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if self is negative.

§Examples

See here.

Source§

impl FloorSqrtAssign for i16

Source§

fn floor_sqrt_assign(&mut self)

Replaces an integer with the floor of its square root.

$x \gets \lfloor\sqrt{x}\rfloor$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if self is negative.

§Examples

See here.

Source§

impl FloorSqrtAssign for i32

Source§

fn floor_sqrt_assign(&mut self)

Replaces an integer with the floor of its square root.

$x \gets \lfloor\sqrt{x}\rfloor$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if self is negative.

§Examples

See here.

Source§

impl FloorSqrtAssign for i64

Source§

fn floor_sqrt_assign(&mut self)

Replaces an integer with the floor of its square root.

$x \gets \lfloor\sqrt{x}\rfloor$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if self is negative.

§Examples

See here.

Source§

impl FloorSqrtAssign for i128

Source§

fn floor_sqrt_assign(&mut self)

Replaces an integer with the floor of its square root.

$x \gets \lfloor\sqrt{x}\rfloor$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if self is negative.

§Examples

See here.

Source§

impl FloorSqrtAssign for isize

Source§

fn floor_sqrt_assign(&mut self)

Replaces an integer with the floor of its square root.

$x \gets \lfloor\sqrt{x}\rfloor$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if self is negative.

§Examples

See here.

Source§

impl FloorSqrtAssign for u8

Source§

fn floor_sqrt_assign(&mut self)

Replaces an integer with the floor of its square root.

$x \gets \lfloor\sqrt{x}\rfloor$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if self is negative.

§Examples

See here.

Source§

impl FloorSqrtAssign for u16

Source§

fn floor_sqrt_assign(&mut self)

Replaces an integer with the floor of its square root.

$x \gets \lfloor\sqrt{x}\rfloor$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if self is negative.

§Examples

See here.

Source§

impl FloorSqrtAssign for u32

Source§

fn floor_sqrt_assign(&mut self)

Replaces an integer with the floor of its square root.

$x \gets \lfloor\sqrt{x}\rfloor$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if self is negative.

§Examples

See here.

Source§

impl FloorSqrtAssign for u64

Source§

fn floor_sqrt_assign(&mut self)

Replaces an integer with the floor of its square root.

$x \gets \lfloor\sqrt{x}\rfloor$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if self is negative.

§Examples

See here.

Source§

impl FloorSqrtAssign for u128

Source§

fn floor_sqrt_assign(&mut self)

Replaces an integer with the floor of its square root.

$x \gets \lfloor\sqrt{x}\rfloor$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if self is negative.

§Examples

See here.

Source§

impl FloorSqrtAssign for usize

Source§

fn floor_sqrt_assign(&mut self)

Replaces an integer with the floor of its square root.

$x \gets \lfloor\sqrt{x}\rfloor$.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if self is negative.

§Examples

See here.

Implementors§