pub trait Radians {
// Required methods
fn _90() -> Self;
fn _180() -> Self;
fn _360() -> Self;
fn deg_to_rad(self) -> Self;
fn rad_to_deg(self) -> Self;
}
Expand description
Useful constants for radians.
Required Methods§
Sourcefn deg_to_rad(self) -> Self
fn deg_to_rad(self) -> Self
Convert a value to radians from degrees.
Equivalent to value * (π / 180)
.
Sourcefn rad_to_deg(self) -> Self
fn rad_to_deg(self) -> Self
Convert a value to degrees from radians.
Equivalent to value * (180 / π)
.
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.