[]Struct gdnative_common::geom::euclid::Angle

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

An angle in radians

Fields

radians: T

Methods

impl<T> Angle<T>

pub fn radians(radians: T) -> Angle<T>

pub fn get(self) -> T

impl<T> Angle<T> where
    T: Trig

pub fn degrees(deg: T) -> Angle<T>

pub fn to_degrees(self) -> T

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

pub fn positive(&self) -> Angle<T>

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

pub fn signed(&self) -> Angle<T>

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

impl<T> Angle<T> where
    T: Float

pub fn sin_cos(self) -> (T, T)

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

impl<T> Angle<T> where
    T: Zero

pub fn zero() -> Angle<T>

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

pub fn pi() -> Angle<T>

pub fn two_pi() -> Angle<T>

pub fn frac_pi_2() -> Angle<T>

pub fn frac_pi_3() -> Angle<T>

pub fn frac_pi_4() -> Angle<T>

Trait Implementations

impl<T> Add<Angle<T>> for Angle<T> where
    T: Clone + Add<T, Output = T>, 

type Output = Angle<T>

The resulting type after applying the + operator.

impl<T> AddAssign<Angle<T>> for Angle<T> where
    T: Clone + AddAssign<T>, 

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

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

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

impl<T> Div<Angle<T>> for Angle<T> where
    T: Clone + Div<T, Output = T>, 

type Output = T

The resulting type after applying the / operator.

impl<T> Div<T> for Angle<T> where
    T: Clone + Div<T, Output = T>, 

type Output = Angle<T>

The resulting type after applying the / operator.

impl<T> DivAssign<T> for Angle<T> where
    T: Clone + DivAssign<T>, 

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

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

impl<T> Mul<T> for Angle<T> where
    T: Clone + Mul<T, Output = T>, 

type Output = Angle<T>

The resulting type after applying the * operator.

impl<T> MulAssign<T> for Angle<T> where
    T: Clone + MulAssign<T>, 

impl<T> Neg for Angle<T> where
    T: Neg<Output = T>, 

type Output = Angle<T>

The resulting type after applying the - operator.

impl<T> PartialEq<Angle<T>> for Angle<T> where
    T: PartialEq<T>, 

impl<T> PartialOrd<Angle<T>> for Angle<T> where
    T: PartialOrd<T>, 

impl<T> StructuralEq for Angle<T>

impl<T> StructuralPartialEq for Angle<T>

impl<T> Sub<Angle<T>> for Angle<T> where
    T: Clone + Sub<T, Output = T>, 

type Output = Angle<T>

The resulting type after applying the - operator.

impl<T> SubAssign<Angle<T>> for Angle<T> where
    T: Clone + SubAssign<T>, 

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<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> 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.