pub trait Transcendental: Scalar {
const PI: Self;
// Required methods
fn to_f32(self) -> f32;
fn from_f32(value: f32) -> Self;
fn sqrt(self) -> Self;
fn exp(self) -> Self;
fn ln(self) -> Self;
fn sin(self) -> Self;
fn cos(self) -> Self;
fn tan(self) -> Self;
// Provided methods
fn to_f64(self) -> f64 { ... }
fn from_f64(value: f64) -> Self { ... }
}Expand description
Трансцендентные операции (sin, cos, sqrt, exp, ln).
Расширяет Scalar функциями, доступными только для типов
с плавающей точкой (f32, f64).
Required Associated Constants§
Required Methods§
fn to_f32(self) -> f32
fn from_f32(value: f32) -> Self
fn sqrt(self) -> Self
fn exp(self) -> Self
fn ln(self) -> Self
fn sin(self) -> Self
fn cos(self) -> Self
fn tan(self) -> Self
Provided 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.