FromSqrt

Trait FromSqrt 

Source
pub trait FromSqrt<T>: Sized {
    // Required method
    fn from_sqrt(t: T) -> Result<Self, FromSqrtError<T>>;
}
Expand description

Create a number instance from the square root of another number.

In case there are multiple solution for square root, only canonical result will be returned

Required Methods§

Source

fn from_sqrt(t: T) -> Result<Self, FromSqrtError<T>>

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.

Implementors§

Source§

impl<T: QuadraticBase + CheckedMul> FromSqrt<Ratio<T>> for QuadraticSurd<T>
where for<'r> &'r T: RefNum<T>,

Source§

impl<T: QuadraticBase + CheckedMul> FromSqrt<QuadraticSurd<T>> for QuadraticSurd<T>
where for<'r> &'r T: RefNum<T>,

Source§

impl<T: QuadraticBase> FromSqrt<T> for QuadraticSurd<T>
where for<'r> &'r T: RefNum<T>,