pub trait F64Polyfill: Sized {
Show 24 methods
// Required methods
fn abs(self) -> f64;
fn acos(self) -> f64;
fn asin(self) -> f64;
fn atan(self) -> f64;
fn atan2(self, other: f64) -> f64;
fn ceil(self) -> f64;
fn copysign(self, sign: f64) -> f64;
fn cos(self) -> f64;
fn exp(self) -> f64;
fn floor(self) -> f64;
fn hypot(self, other: f64) -> f64;
fn ln(self) -> f64;
fn log2(self) -> f64;
fn log10(self) -> f64;
fn mul_add(self, a: f64, b: f64) -> f64;
fn powf(self, n: f64) -> f64;
fn powi(self, n: i64) -> f64;
fn recip(self) -> f64;
fn round(self) -> f64;
fn sin(self) -> f64;
fn sin_cos(self) -> (f64, f64);
fn sqrt(self) -> f64;
fn tan(self) -> f64;
fn trunc(self) -> f64;
}Expand description
Polyfills for various std-only f64 methods.
Required Methods§
Sourcefn hypot(self, other: f64) -> f64
fn hypot(self, other: f64) -> f64
Compute the distance between the origin and a point (self, other) on the Euclidean plane.
Equivalently, compute the length of the hypotenuse of a right-angle triangle
with other sides having length self.abs() and other.abs().
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".