Skip to main content

Hypot

Trait Hypot 

Source
pub trait Hypot {
    // Required method
    fn hypot(self, other: Self) -> Self;
}
Expand description

Methods for calculating the lengths of a hypotenuse.

Required Methods§

Source

fn hypot(self, other: Self) -> Self

Returns the length of the hypotenuse formed by self and other, i.e. sqrt(self * self + other * other).

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.

Implementations on Foreign Types§

Source§

impl Hypot for f32

Available on crate feature std, or non-crate feature libm only.
Source§

fn hypot(self, other: f32) -> f32

Source§

impl Hypot for f64

Available on crate feature std, or non-crate feature libm only.
Source§

fn hypot(self, other: f64) -> f64

Implementors§