Trait ToAngle

Source
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§

Source

fn rad(self) -> Angle<Self>

Creates an angle with the value as radians.

Source

fn rad_unbounded(self) -> AngleUnbounded<Self>

Creates an unbounded angle with the value as radians.

Source

fn deg(self) -> Angle<Self>

Creates an angle with the value as degrees.

Source

fn deg_unbounded(self) -> AngleUnbounded<Self>

Creates an unbounded angle with the value as degrees.

Source

fn turns(self) -> Angle<Self>

Creates an angle with the value as turns.

Source

fn turns_unbounded(self) -> AngleUnbounded<Self>

Creates an unbounded angle with the value as turns.

Source

fn grad(self) -> Angle<Self>

Creates an angle with the value as gradians.

Source

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.

Implementors§

Source§

impl<F: Float> ToAngle for F