pub trait Real:
Num
+ Signed
+ Div<Output = Self>
+ Rem<Output = Self>
+ PartialOrd {
Show 17 methods
// Required methods
fn from_f64(v: f64) -> Self;
fn to_f64(self) -> f64;
fn epsilon() -> Self;
fn sqrt(self) -> Self;
fn cbrt(self) -> Self;
fn powf(self, e: Self) -> Self;
fn powi(self, e: i32) -> Self;
fn recip(self) -> Self;
fn floor(self) -> Self;
fn ceil(self) -> Self;
fn round(self) -> Self;
fn trunc(self) -> Self;
fn fract(self) -> Self;
fn copysign(self, other: Self) -> Self;
fn abs_sub(self, other: Self) -> Self;
fn min(self, other: Self) -> Self;
fn max(self, other: Self) -> Self;
}Expand description
Core real number operations: conversion, powers, rounding, min/max.
Implemented for f32 and f64. This is the minimal trait bound needed
by most generic math code.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".