[][src]Struct cgmath::Deg

#[repr(C)]
pub struct Deg<S>(pub S);

An angle, in degrees.

This type is marked as #[repr(C)].

Trait Implementations

impl<S: BaseFloat> Angle for Deg<S>
[src]

type Unitless = S

fn normalize(self) -> Self
[src]

Return the angle, normalized to the range [0, full_turn).

fn normalize_signed(self) -> Self
[src]

Return the angle, normalized to the range [-turn_div_2, turn_div_2).

fn opposite(self) -> Self
[src]

Return the angle rotated by half a turn.

fn bisect(self, other: Self) -> Self
[src]

Returns the interior bisector of the two angles.

fn turn_div_2() -> Self
[src]

Half of a full rotation.

fn turn_div_3() -> Self
[src]

A third of a full rotation.

fn turn_div_4() -> Self
[src]

A quarter of a full rotation.

fn turn_div_6() -> Self
[src]

A sixth of a full rotation.

fn csc(self) -> Self::Unitless
[src]

Compute the cosecant of the angle. Read more

fn cot(self) -> Self::Unitless
[src]

Compute the cotangent of the angle. Read more

fn sec(self) -> Self::Unitless
[src]

Compute the secant of the angle. Read more

impl<S> From<Rad<S>> for Deg<S> where
    S: BaseFloat
[src]

impl<S> From<Deg<S>> for Rad<S> where
    S: BaseFloat
[src]

impl<S: PartialOrd> PartialOrd<Deg<S>> for Deg<S>
[src]

impl<S: Copy> Copy for Deg<S>
[src]

impl<S: PartialEq> PartialEq<Deg<S>> for Deg<S>
[src]

impl<S: Clone> Clone for Deg<S>
[src]

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

Performs copy-assignment from source. Read more

impl<S: Debug> Debug for Deg<S>
[src]

impl<S: BaseFloat> Add<Deg<S>> for Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the + operator.

impl<'a, S: BaseFloat> Add<&'a Deg<S>> for Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the + operator.

impl<'a, S: BaseFloat> Add<Deg<S>> for &'a Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the + operator.

impl<'a, 'b, S: BaseFloat> Add<&'a Deg<S>> for &'b Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the + operator.

impl<S: BaseFloat> Sub<Deg<S>> for Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the - operator.

impl<'a, S: BaseFloat> Sub<&'a Deg<S>> for Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the - operator.

impl<'a, S: BaseFloat> Sub<Deg<S>> for &'a Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the - operator.

impl<'a, 'b, S: BaseFloat> Sub<&'a Deg<S>> for &'b Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the - operator.

impl<S: BaseFloat> Mul<S> for Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the * operator.

impl<'a, S: BaseFloat> Mul<S> for &'a Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the * operator.

impl<S: BaseFloat> Div<Deg<S>> for Deg<S>
[src]

type Output = S

The resulting type after applying the / operator.

impl<'a, S: BaseFloat> Div<&'a Deg<S>> for Deg<S>
[src]

type Output = S

The resulting type after applying the / operator.

impl<'a, S: BaseFloat> Div<Deg<S>> for &'a Deg<S>
[src]

type Output = S

The resulting type after applying the / operator.

impl<'a, 'b, S: BaseFloat> Div<&'a Deg<S>> for &'b Deg<S>
[src]

type Output = S

The resulting type after applying the / operator.

impl<S: BaseFloat> Div<S> for Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the / operator.

impl<'a, S: BaseFloat> Div<S> for &'a Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the / operator.

impl<S: BaseFloat> Rem<Deg<S>> for Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the % operator.

impl<'a, S: BaseFloat> Rem<&'a Deg<S>> for Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the % operator.

impl<'a, S: BaseFloat> Rem<Deg<S>> for &'a Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the % operator.

impl<'a, 'b, S: BaseFloat> Rem<&'a Deg<S>> for &'b Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the % operator.

impl<S: BaseFloat> Neg for Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the - operator.

impl<'a, S: BaseFloat> Neg for &'a Deg<S>
[src]

type Output = Deg<S>

The resulting type after applying the - operator.

impl<S: BaseFloat + AddAssign<S>> AddAssign<Deg<S>> for Deg<S>
[src]

impl<S: BaseFloat + SubAssign<S>> SubAssign<Deg<S>> for Deg<S>
[src]

impl<S: BaseFloat + MulAssign<S>> MulAssign<S> for Deg<S>
[src]

impl<S: BaseFloat + DivAssign<S>> DivAssign<S> for Deg<S>
[src]

impl<S: BaseFloat + RemAssign<S>> RemAssign<Deg<S>> for Deg<S>
[src]

impl<S: BaseFloat> Sum<Deg<S>> for Deg<S>
[src]

impl<'a, S: 'a + BaseFloat> Sum<&'a Deg<S>> for Deg<S>
[src]

impl<S: BaseFloat> AbsDiffEq for Deg<S>
[src]

type Epsilon = S::Epsilon

Used for specifying relative comparisons.

fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool
[src]

The inverse of ApproxEq::abs_diff_eq.

impl<S: BaseFloat> RelativeEq for Deg<S>
[src]

fn relative_ne(
    &self,
    other: &Self,
    epsilon: Self::Epsilon,
    max_relative: Self::Epsilon
) -> bool
[src]

The inverse of ApproxEq::relative_eq.

impl<S: BaseFloat> UlpsEq for Deg<S>
[src]

fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]

The inverse of ApproxEq::ulps_eq.

impl<S: Bounded> Bounded for Deg<S>
[src]

impl<S: BaseFloat> Zero for Deg<S>
[src]

impl<S> Distribution<Deg<S>> for Standard where
    Standard: Distribution<S>,
    S: BaseFloat + SampleUniform
[src]

fn sample_iter<R>(&'a self, rng: &'a mut R) -> DistIter<'a, Self, R, T> where
    R: Rng
[src]

Create an iterator that generates random values of T, using rng as the source of randomness. Read more

Auto Trait Implementations

impl<S> Send for Deg<S> where
    S: Send

impl<S> Sync for Deg<S> where
    S: 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]

impl<T, Rhs> NumAssignOps for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]