pub trait ToAngle: Sized {
// Required methods
fn rad(self) -> Angle<Self>;
fn rad_unbounded(self) -> AngleUnbounded<Self>;
fn deg(self) -> Angle<Self>;
fn deg_unbounded(self) -> AngleUnbounded<Self>;
fn turns(self) -> Angle<Self>;
fn turns_unbounded(self) -> AngleUnbounded<Self>;
fn grad(self) -> Angle<Self>;
fn grad_unbounded(self) -> AngleUnbounded<Self>;
}Expand description
Helper trait to convert a numerical value into an angle.
Required Methods§
Sourcefn rad_unbounded(self) -> AngleUnbounded<Self>
fn rad_unbounded(self) -> AngleUnbounded<Self>
Creates an unbounded angle with the value as radians.
Sourcefn deg_unbounded(self) -> AngleUnbounded<Self>
fn deg_unbounded(self) -> AngleUnbounded<Self>
Creates an unbounded angle with the value as degrees.
Sourcefn turns_unbounded(self) -> AngleUnbounded<Self>
fn turns_unbounded(self) -> AngleUnbounded<Self>
Creates an unbounded angle with the value as turns.
Sourcefn grad_unbounded(self) -> AngleUnbounded<Self>
fn grad_unbounded(self) -> AngleUnbounded<Self>
Creates an unbounded angle with the value as gradians.
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.