Trait Trig
pub trait Trig {
// Required methods
fn sin(self) -> Self;
fn cos(self) -> Self;
fn tan(self) -> Self;
fn fast_atan2(y: Self, x: Self) -> Self;
fn degrees_to_radians(deg: Self) -> Self;
fn radians_to_degrees(rad: Self) -> Self;
}
Available on crate feature
canvas
only.Expand description
Trait for basic trigonometry functions, so they can be used on generic numeric types
Required Methods§
fn sin(self) -> Self
fn cos(self) -> Self
fn tan(self) -> Self
fn fast_atan2(y: Self, x: Self) -> Self
fn degrees_to_radians(deg: Self) -> Self
fn radians_to_degrees(rad: Self) -> Self
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.