[][src]Struct lyon_geom::Angle

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

An angle in radians. An angle in radians

Fields

radians: T

Implementations

impl<T> Angle<T>[src]

An angle in radians.

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

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

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

An angle in radians.

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

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

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

An angle in radians.

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

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

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

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

impl<T> Angle<T> where
    T: Rem<T, Output = T> + Sub<T, Output = T> + Add<T, Output = T> + Mul<T, Output = T> + One + FloatConst + Copy
[src]

An angle in radians.

pub fn angle_to(&self, to: Angle<T>) -> Angle<T>[src]

Returns the shortest signed angle between two angles.

Takes wrapping and signs into account.

pub fn lerp(&self, other: Angle<T>, t: T) -> Angle<T>[src]

Linear interpolation between two angles, using the shortest path.

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

An angle in radians.

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

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

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

An angle in radians.

pub fn zero() -> Angle<T>[src]

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

An angle in radians.

pub fn pi() -> Angle<T>[src]

pub fn two_pi() -> Angle<T>[src]

pub fn frac_pi_2() -> Angle<T>[src]

pub fn frac_pi_3() -> Angle<T>[src]

pub fn frac_pi_4() -> Angle<T>[src]

impl<T> Angle<T> where
    T: NumCast + Copy
[src]

An angle in radians.

pub fn cast<NewT>(&self) -> Angle<NewT> where
    NewT: NumCast
[src]

Cast from one numeric representation to another.

pub fn try_cast<NewT>(&self) -> Option<Angle<NewT>> where
    NewT: NumCast
[src]

Fallible cast from one numeric representation to another.

pub fn to_f32(&self) -> Angle<f32>[src]

Cast angle to f32.

pub fn to_f64(&self) -> Angle<f64>[src]

Cast angle f64.

Trait Implementations

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

type Output = Angle<T>

The resulting type after applying the + operator.

impl<T> AddAssign<Angle<T>> for Angle<T> where
    T: AddAssign<T>, 
[src]

impl<T> ApproxEq<T> for Angle<T> where
    T: ApproxEq<T>, 
[src]

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

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

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

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

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

type Output = T

The resulting type after applying the / operator.

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

type Output = Angle<T>

The resulting type after applying the / operator.

impl<T> DivAssign<T> for Angle<T> where
    T: DivAssign<T>, 
[src]

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

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

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

type Output = Angle<T>

The resulting type after applying the * operator.

impl<T> MulAssign<T> for Angle<T> where
    T: MulAssign<T>, 
[src]

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

type Output = Angle<T>

The resulting type after applying the - operator.

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

impl<T> PartialOrd<Angle<T>> for Angle<T> where
    T: PartialOrd<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: Sub<T, Output = T>, 
[src]

type Output = Angle<T>

The resulting type after applying the - operator.

impl<T> SubAssign<Angle<T>> for Angle<T> where
    T: SubAssign<T>, 
[src]

Auto Trait Implementations

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

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

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

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

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

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.