pub trait Root: TruncRoot {
// Required methods
fn sqrt(self) -> Self;
fn cbrt(self) -> Self;
}Expand description
Trait for sqrt and cbrt methods, which compute the square root and cube root of a number.
For non-numbers types (number-containers like Vec2) the logic of sqrt / cbrt should follow the logic of Mul.
For example, if <Vec2 as Mul> multiplies each component seperately, sqrt each component seperately.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.