[][src]Struct euclid::Angle

pub struct Angle<T> {
    pub radians: T,
}

An angle in radians

Fields

radians: T

Methods

impl<T> Angle<T>[src]

pub fn radians(radians: T) -> Self[src]

pub fn get(self) -> T[src]

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

pub fn degrees(deg: T) -> Self[src]

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

impl<T> Angle<T> where
    T: Rem<Output = T> + Sub<Output = T> + Add<Output = T> + Zero + FloatConst + PartialOrd + Copy
[src]

pub fn positive(&self) -> Self[src]

Returns this angle in the [0..2*PI[ range.

pub fn signed(&self) -> Self[src]

Returns this angle in the ]-PI..PI] range.

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

pub fn sin_cos(self) -> (T, T)[src]

Returns (sin(self), cos(self)).

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

pub fn zero() -> Self[src]

impl<T> Angle<T> where
    T: FloatConst + Add<Output = T>, 
[src]

pub fn pi() -> Self[src]

pub fn two_pi() -> Self[src]

pub fn frac_pi_2() -> Self[src]

pub fn frac_pi_3() -> Self[src]

pub fn frac_pi_4() -> Self[src]

Trait Implementations

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

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

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

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

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

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

impl<T: Clone + Add<T, Output = T>> Add<Angle<T>> for Angle<T>[src]

type Output = Angle<T>

The resulting type after applying the + operator.

impl<T: Clone + Sub<T, Output = T>> Sub<Angle<T>> for Angle<T>[src]

type Output = Angle<T>

The resulting type after applying the - operator.

impl<T: Clone + Mul<T, Output = T>> Mul<T> for Angle<T>[src]

type Output = Angle<T>

The resulting type after applying the * operator.

impl<T: Clone + Div<T, Output = T>> Div<Angle<T>> for Angle<T>[src]

type Output = T

The resulting type after applying the / operator.

impl<T: Clone + Div<T, Output = T>> Div<T> for Angle<T>[src]

type Output = Angle<T>

The resulting type after applying the / operator.

impl<T: Neg<Output = T>> Neg for Angle<T>[src]

type Output = Self

The resulting type after applying the - operator.

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

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

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

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

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

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

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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.

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.