[][src]Struct polyhorn_ui::physics::Angle

pub struct Angle<T> { /* fields omitted */ }

Type-safe representation for angles.

Implementations

impl<T> Angle<T> where
    T: Float
[src]

pub fn with_radians(radians: T) -> Angle<T>[src]

Returns a new angle with the given radians.

pub fn to_radians(&self) -> T[src]

Converts the given angle to radians.

impl<T> Angle<T> where
    T: Float + FloatConst
[src]

pub fn with_degrees(degrees: T) -> Angle<T>[src]

Returns a new angle with the given degrees.

pub fn to_degrees(&self) -> T[src]

Converts the given angle to degrees.

Trait Implementations

impl<T, '_> Add<&'_ Angle<T>> for &'_ Angle<T> where
    T: Float + FloatConst
[src]

type Output = Angle<T>

The resulting type after applying the + operator.

impl<T: Clone> Clone for Angle<T>[src]

impl<T: Copy> Copy for Angle<T>[src]

impl<T> Debug for Angle<T> where
    T: Float + FloatConst + Debug
[src]

impl<T: Default> Default for Angle<T>[src]

impl<T: Eq> Eq for Angle<T>[src]

impl<T> Neg for Angle<T> where
    T: Neg
[src]

type Output = Angle<T::Output>

The resulting type after applying the - operator.

impl<T: PartialEq> PartialEq<Angle<T>> for Angle<T>[src]

impl<T> StructuralEq for Angle<T>[src]

impl<T> StructuralPartialEq for Angle<T>[src]

impl<T, '_> Sub<&'_ Angle<T>> for &'_ Angle<T> where
    T: Float + FloatConst
[src]

type Output = Angle<T>

The resulting type after applying the - operator.

Auto Trait Implementations

impl<T> RefUnwindSafe for Angle<T> where
    T: RefUnwindSafe

impl<T> Send for Angle<T> where
    T: Send

impl<T> Sync for Angle<T> where
    T: Sync

impl<T> Unpin for Angle<T> where
    T: Unpin

impl<T> UnwindSafe for Angle<T> where
    T: UnwindSafe

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.