[]Struct gdnative::common::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> SubAssign<Angle<T>> for Angle<T> where
    T: SubAssign<T> + Clone

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

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

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> Eq for Angle<T> where
    T: Eq

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

type Output = Angle<T>

The resulting type after applying the + operator.

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

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

Performs copy-assignment from source. Read more

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

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

type Output = T

The resulting type after applying the / operator.

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

type Output = Angle<T>

The resulting type after applying the / operator.

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

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

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

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> PartialOrd<Angle<T>> for Angle<T> where
    T: PartialOrd<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> DivAssign<T> for Angle<T> where
    T: DivAssign<T> + Clone

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

type Output = Angle<T>

The resulting type after applying the * operator.

Auto Trait Implementations

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

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

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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