Struct cgmath::Deg [] [src]

pub struct Deg<S>(pub S);

An angle, in degrees.

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

Trait Implementations

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

fn partial_cmp(&self, __arg_0: &Deg<S>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more

fn lt(&self, __arg_0: &Deg<S>) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more

fn le(&self, __arg_0: &Deg<S>) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn gt(&self, __arg_0: &Deg<S>) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more

fn ge(&self, __arg_0: &Deg<S>) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

fn eq(&self, __arg_0: &Deg<S>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Deg<S>) -> bool

This method tests for !=.

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

fn clone(&self) -> Deg<S>

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

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

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

fn decode<__DS: Decoder>(__arg_0: &mut __DS) -> Result<Deg<S>, __DS::Error>

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

fn encode<__SS: Encoder>(&self, __arg_0: &mut __SS) -> Result<(), __SS::Error>

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

fn from(rad: Rad<S>) -> Deg<S>

Performs the conversion.

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

fn zero() -> Deg<S>

Returns the additive identity element of Self, 0. Read more

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.

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

type Unitless = S

fn full_turn() -> Deg<S>

A full rotation.

fn sin(self) -> S

Compute the sine of the angle, returning a unitless ratio. Read more

fn cos(self) -> S

Compute the cosine of the angle, returning a unitless ratio. Read more

fn tan(self) -> S

Compute the tangent of the angle, returning a unitless ratio. Read more

fn sin_cos(self) -> (S, S)

Compute the sine and cosine of the angle, returning the result as a pair. Read more

fn asin(a: S) -> Deg<S>

Compute the arcsine of the ratio, returning the resulting angle. Read more

fn acos(a: S) -> Deg<S>

Compute the arccosine of the ratio, returning the resulting angle. Read more

fn atan(a: S) -> Deg<S>

Compute the arctangent of the ratio, returning the resulting angle. Read more

fn atan2(a: S, b: S) -> Deg<S>

fn normalize(self) -> Self

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

fn opposite(self) -> Self

Return the angle rotated by half a turn.

fn bisect(self, other: Self) -> Self

Returns the interior bisector of the two angles.

fn turn_div_2() -> Self

Half of a full rotation.

fn turn_div_3() -> Self

A third of a full rotation.

fn turn_div_4() -> Self

A quarter of a full rotation.

fn turn_div_6() -> Self

A sixth of a full rotation.

fn csc(self) -> Self::Unitless

Compute the cosecant of the angle. Read more

fn cot(self) -> Self::Unitless

Compute the cotangent of the angle. Read more

fn sec(self) -> Self::Unitless

Compute the secant of the angle. Read more

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

type Output = Deg<S>

The resulting type after applying the - operator

fn neg(self) -> Deg<S>

The method for the unary - operator

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

type Output = Deg<S>

The resulting type after applying the - operator

fn neg(self) -> Deg<S>

The method for the unary - operator

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

type Output = Deg<S>

The resulting type after applying the + operator

fn add(self, other: Deg<S>) -> Deg<S>

The method for 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

fn add(self, other: &'a Deg<S>) -> Deg<S>

The method for 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

fn add(self, other: Deg<S>) -> Deg<S>

The method for 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

fn add(self, other: &'a Deg<S>) -> Deg<S>

The method for the + operator

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

type Output = Deg<S>

The resulting type after applying the - operator

fn sub(self, other: Deg<S>) -> Deg<S>

The method for 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

fn sub(self, other: &'a Deg<S>) -> Deg<S>

The method for 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

fn sub(self, other: Deg<S>) -> Deg<S>

The method for 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

fn sub(self, other: &'a Deg<S>) -> Deg<S>

The method for the - operator

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

type Output = S

The resulting type after applying the / operator

fn div(self, other: Deg<S>) -> S

The method for the / operator

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

type Output = S

The resulting type after applying the / operator

fn div(self, other: &'a Deg<S>) -> S

The method for the / operator

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

type Output = S

The resulting type after applying the / operator

fn div(self, other: Deg<S>) -> S

The method for 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

fn div(self, other: &'a Deg<S>) -> S

The method for the / operator

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

type Output = Deg<S>

The resulting type after applying the % operator

fn rem(self, other: Deg<S>) -> Deg<S>

The method for 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

fn rem(self, other: &'a Deg<S>) -> Deg<S>

The method for 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

fn rem(self, other: Deg<S>) -> Deg<S>

The method for 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

fn rem(self, other: &'a Deg<S>) -> Deg<S>

The method for the % operator

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

fn add_assign(&mut self, other: Deg<S>)

The method for the += operator

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

fn sub_assign(&mut self, other: Deg<S>)

The method for the -= operator

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

fn rem_assign(&mut self, other: Deg<S>)

The method for the %= operator

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

type Output = Deg<S>

The resulting type after applying the * operator

fn mul(self, other: S) -> Deg<S>

The method for the * operator

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

type Output = Deg<S>

The resulting type after applying the * operator

fn mul(self, other: S) -> Deg<S>

The method for the * operator

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

type Output = Deg<S>

The resulting type after applying the / operator

fn div(self, other: S) -> Deg<S>

The method for the / operator

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

type Output = Deg<S>

The resulting type after applying the / operator

fn div(self, other: S) -> Deg<S>

The method for the / operator

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

fn mul_assign(&mut self, scalar: S)

The method for the *= operator

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

fn div_assign(&mut self, scalar: S)

The method for the /= operator

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

type Epsilon = S

fn approx_eq_eps(&self, other: &Deg<S>, epsilon: &S) -> bool

fn approx_epsilon() -> Self::Epsilon

fn approx_eq(&self, other: &Self) -> bool

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

fn rand<R: Rng>(rng: &mut R) -> Deg<S>

Generates a random instance of this type using the specified source of randomness. Read more

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

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.