IsSquare

Trait IsSquare 

Source
pub trait IsSquare {
    // Required method
    fn is_square(&self) -> bool;
}
Expand description

A trait for testing whether a number is a square.

Required Methods§

Source

fn is_square(&self) -> bool

Implementations on Foreign Types§

Source§

impl IsSquare for i8

Source§

fn is_square(&self) -> bool

Determines whether an integer is a perfect square.

$f(x) = (\exists b \in \Z : b^2 = x)$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl IsSquare for i16

Source§

fn is_square(&self) -> bool

Determines whether an integer is a perfect square.

$f(x) = (\exists b \in \Z : b^2 = x)$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl IsSquare for i32

Source§

fn is_square(&self) -> bool

Determines whether an integer is a perfect square.

$f(x) = (\exists b \in \Z : b^2 = x)$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl IsSquare for i64

Source§

fn is_square(&self) -> bool

Determines whether an integer is a perfect square.

$f(x) = (\exists b \in \Z : b^2 = x)$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl IsSquare for i128

Source§

fn is_square(&self) -> bool

Determines whether an integer is a perfect square.

$f(x) = (\exists b \in \Z : b^2 = x)$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl IsSquare for isize

Source§

fn is_square(&self) -> bool

Determines whether an integer is a perfect square.

$f(x) = (\exists b \in \Z : b^2 = x)$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl IsSquare for u8

Source§

fn is_square(&self) -> bool

Determines whether an integer is a perfect square.

$f(x) = (\exists b \in \Z : b^2 = x)$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl IsSquare for u16

Source§

fn is_square(&self) -> bool

Determines whether an integer is a perfect square.

$f(x) = (\exists b \in \Z : b^2 = x)$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl IsSquare for u32

Source§

fn is_square(&self) -> bool

Determines whether an integer is a perfect square.

$f(x) = (\exists b \in \Z : b^2 = x)$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl IsSquare for u64

Source§

fn is_square(&self) -> bool

Determines whether an integer is a perfect square.

$f(x) = (\exists b \in \Z : b^2 = x)$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl IsSquare for u128

Source§

fn is_square(&self) -> bool

Determines whether an integer is a perfect square.

$f(x) = (\exists b \in \Z : b^2 = x)$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl IsSquare for usize

Source§

fn is_square(&self) -> bool

Determines whether an integer is a perfect square.

$f(x) = (\exists b \in \Z : b^2 = x)$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Implementors§