Trait FromAngle

Source
pub trait FromAngle<T>
where T: Angle,
{ // Required method fn from_angle(from: T) -> Self; }
Expand description

Construct Self from an angle.

Analogous to the traits in the standard library, FromAngle and IntoAngle provide a way to convert between angle types and to mix various angle types in a single operation.

Required Methods§

Source

fn from_angle(from: T) -> Self

Construct Self by converting a T.

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<T, U> FromAngle<U> for ArcMinutes<T>
where U: Angle<Scalar = T>, T: Float,

Source§

impl<T, U> FromAngle<U> for ArcSeconds<T>
where U: Angle<Scalar = T>, T: Float,

Source§

impl<T, U> FromAngle<U> for Deg<T>
where U: Angle<Scalar = T>, T: Float,

Source§

impl<T, U> FromAngle<U> for Gon<T>
where U: Angle<Scalar = T>, T: Float,

Source§

impl<T, U> FromAngle<U> for Rad<T>
where U: Angle<Scalar = T>, T: Float,

Source§

impl<T, U> FromAngle<U> for Turns<T>
where U: Angle<Scalar = T>, T: Float,