Skip to main content

Sqrt

Trait Sqrt 

Source
pub trait Sqrt {
    // Required method
    fn sqrt(self) -> Self;
}
Expand description

Square root of a non-negative value (C++ SquareRootApproximation): integer Newton iteration on raw << FRAC in the wide type, which gives the floor of the exact root in raw units. Zero and negative values give zero. The Adam and RMSprop optimizers use it.

Required Methods§

Source

fn sqrt(self) -> Self

floor(sqrt(self)) in this format; 0 for self <= 0.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<const FRAC: u32> Sqrt for QValue<i16, FRAC>

Source§

impl<const FRAC: u32> Sqrt for QValue<i32, FRAC>