# [−][src]Struct cgmath::Deg

An angle, in degrees.

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

.

## Trait Implementations

`impl<S: BaseFloat> Angle for Deg<S>`

[src]

`impl<S: BaseFloat> Angle for Deg<S>`

`type Unitless = S`

`fn full_turn() -> Deg<S>` | [src] |

`fn sin(self) -> S` | [src] |

`fn cos(self) -> S` | [src] |

`fn tan(self) -> S` | [src] |

`fn sin_cos(self) -> (S, S)` | [src] |

`fn asin(a: S) -> Deg<S>` | [src] |

`fn acos(a: S) -> Deg<S>` | [src] |

`fn atan(a: S) -> Deg<S>` | [src] |

`fn atan2(a: S, b: S) -> Deg<S>` | [src] |

`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<Rad<S>> for Deg<S> where`

S: BaseFloat,

`impl<S> From<Deg<S>> for Rad<S> where`

S: BaseFloat,

[src]

`impl<S> From<Deg<S>> for Rad<S> where`

S: BaseFloat,

`impl<S: PartialOrd> PartialOrd<Deg<S>> for Deg<S>`

[src]

`impl<S: PartialOrd> PartialOrd<Deg<S>> for Deg<S>`

`fn partial_cmp(&self, other: &Deg<S>) -> Option<Ordering>` | [src] |

`fn lt(&self, other: &Deg<S>) -> bool` | [src] |

`fn le(&self, other: &Deg<S>) -> bool` | [src] |

`fn gt(&self, other: &Deg<S>) -> bool` | [src] |

`fn ge(&self, other: &Deg<S>) -> bool` | [src] |

`impl<S: Copy> Copy for Deg<S>`

[src]

`impl<S: Copy> Copy for Deg<S>`

`impl<S: PartialEq> PartialEq<Deg<S>> for Deg<S>`

[src]

`impl<S: PartialEq> PartialEq<Deg<S>> for Deg<S>`

`impl<S: Clone> Clone for Deg<S>`

[src]

`impl<S: Clone> Clone for Deg<S>`

`fn clone(&self) -> 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: Debug> Debug for Deg<S>`

`impl<S: BaseFloat> Add<Deg<S>> for Deg<S>`

[src]

`impl<S: BaseFloat> Add<Deg<S>> for Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `+`

operator.

`fn add(self, other: Deg<S>) -> Deg<S>` | [src] |

`impl<'a, S: BaseFloat> Add<&'a Deg<S>> for Deg<S>`

[src]

`impl<'a, S: BaseFloat> Add<&'a Deg<S>> for Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `+`

operator.

`fn add(self, other: &'a Deg<S>) -> Deg<S>` | [src] |

`impl<'a, S: BaseFloat> Add<Deg<S>> for &'a Deg<S>`

[src]

`impl<'a, S: BaseFloat> Add<Deg<S>> for &'a Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `+`

operator.

`fn add(self, other: Deg<S>) -> Deg<S>` | [src] |

`impl<'a, 'b, S: BaseFloat> Add<&'a Deg<S>> for &'b Deg<S>`

[src]

`impl<'a, 'b, S: BaseFloat> Add<&'a Deg<S>> for &'b Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `+`

operator.

`fn add(self, other: &'a Deg<S>) -> Deg<S>` | [src] |

`impl<S: BaseFloat> Sub<Deg<S>> for Deg<S>`

[src]

`impl<S: BaseFloat> Sub<Deg<S>> for Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `-`

operator.

`fn sub(self, other: Deg<S>) -> Deg<S>` | [src] |

`impl<'a, S: BaseFloat> Sub<&'a Deg<S>> for Deg<S>`

[src]

`impl<'a, S: BaseFloat> Sub<&'a Deg<S>> for Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `-`

operator.

`fn sub(self, other: &'a Deg<S>) -> Deg<S>` | [src] |

`impl<'a, S: BaseFloat> Sub<Deg<S>> for &'a Deg<S>`

[src]

`impl<'a, S: BaseFloat> Sub<Deg<S>> for &'a Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `-`

operator.

`fn sub(self, other: Deg<S>) -> Deg<S>` | [src] |

`impl<'a, 'b, S: BaseFloat> Sub<&'a Deg<S>> for &'b Deg<S>`

[src]

`impl<'a, 'b, S: BaseFloat> Sub<&'a Deg<S>> for &'b Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `-`

operator.

`fn sub(self, other: &'a Deg<S>) -> Deg<S>` | [src] |

`impl<S: BaseFloat> Mul<S> for Deg<S>`

[src]

`impl<S: BaseFloat> Mul<S> for Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `*`

operator.

`fn mul(self, other: S) -> Deg<S>` | [src] |

`impl<'a, S: BaseFloat> Mul<S> for &'a Deg<S>`

[src]

`impl<'a, S: BaseFloat> Mul<S> for &'a Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `*`

operator.

`fn mul(self, other: S) -> Deg<S>` | [src] |

`impl<S: BaseFloat> Div<Deg<S>> for Deg<S>`

[src]

`impl<S: BaseFloat> Div<Deg<S>> for Deg<S>`

`type Output = S`

The resulting type after applying the `/`

operator.

`fn div(self, other: Deg<S>) -> S` | [src] |

`impl<'a, S: BaseFloat> Div<&'a Deg<S>> for Deg<S>`

[src]

`impl<'a, S: BaseFloat> Div<&'a Deg<S>> for Deg<S>`

`type Output = S`

The resulting type after applying the `/`

operator.

`fn div(self, other: &'a Deg<S>) -> S` | [src] |

`impl<'a, S: BaseFloat> Div<Deg<S>> for &'a Deg<S>`

[src]

`impl<'a, S: BaseFloat> Div<Deg<S>> for &'a Deg<S>`

`type Output = S`

The resulting type after applying the `/`

operator.

`fn div(self, other: Deg<S>) -> S` | [src] |

`impl<'a, 'b, S: BaseFloat> Div<&'a Deg<S>> for &'b Deg<S>`

[src]

`impl<'a, 'b, S: BaseFloat> Div<&'a Deg<S>> for &'b Deg<S>`

`type Output = S`

The resulting type after applying the `/`

operator.

`fn div(self, other: &'a Deg<S>) -> S` | [src] |

`impl<S: BaseFloat> Div<S> for Deg<S>`

[src]

`impl<S: BaseFloat> Div<S> for Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `/`

operator.

`fn div(self, other: S) -> Deg<S>` | [src] |

`impl<'a, S: BaseFloat> Div<S> for &'a Deg<S>`

[src]

`impl<'a, S: BaseFloat> Div<S> for &'a Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `/`

operator.

`fn div(self, other: S) -> Deg<S>` | [src] |

`impl<S: BaseFloat> Rem<Deg<S>> for Deg<S>`

[src]

`impl<S: BaseFloat> Rem<Deg<S>> for Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `%`

operator.

`fn rem(self, other: Deg<S>) -> Deg<S>` | [src] |

`impl<'a, S: BaseFloat> Rem<&'a Deg<S>> for Deg<S>`

[src]

`impl<'a, S: BaseFloat> Rem<&'a Deg<S>> for Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `%`

operator.

`fn rem(self, other: &'a Deg<S>) -> Deg<S>` | [src] |

`impl<'a, S: BaseFloat> Rem<Deg<S>> for &'a Deg<S>`

[src]

`impl<'a, S: BaseFloat> Rem<Deg<S>> for &'a Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `%`

operator.

`fn rem(self, other: Deg<S>) -> Deg<S>` | [src] |

`impl<'a, 'b, S: BaseFloat> Rem<&'a Deg<S>> for &'b Deg<S>`

[src]

`impl<'a, 'b, S: BaseFloat> Rem<&'a Deg<S>> for &'b Deg<S>`

`type Output = Deg<S>`

The resulting type after applying the `%`

operator.

`fn rem(self, other: &'a Deg<S>) -> Deg<S>` | [src] |

`impl<S: BaseFloat> Neg for Deg<S>`

[src]

`impl<S: BaseFloat> Neg for Deg<S>`

`impl<'a, S: BaseFloat> Neg for &'a Deg<S>`

[src]

`impl<'a, S: BaseFloat> Neg for &'a Deg<S>`

`impl<S: BaseFloat + AddAssign<S>> AddAssign<Deg<S>> for Deg<S>`

[src]

`impl<S: BaseFloat + AddAssign<S>> AddAssign<Deg<S>> for Deg<S>`

`fn add_assign(&mut self, other: Deg<S>)` | [src] |

`impl<S: BaseFloat + SubAssign<S>> SubAssign<Deg<S>> for Deg<S>`

[src]

`impl<S: BaseFloat + SubAssign<S>> SubAssign<Deg<S>> for Deg<S>`

`fn sub_assign(&mut self, other: Deg<S>)` | [src] |

`impl<S: BaseFloat + MulAssign<S>> MulAssign<S> for Deg<S>`

[src]

`impl<S: BaseFloat + MulAssign<S>> MulAssign<S> for Deg<S>`

`fn mul_assign(&mut self, scalar: S)` | [src] |

`impl<S: BaseFloat + DivAssign<S>> DivAssign<S> for Deg<S>`

[src]

`impl<S: BaseFloat + DivAssign<S>> DivAssign<S> for Deg<S>`

`fn div_assign(&mut self, scalar: S)` | [src] |

`impl<S: BaseFloat + RemAssign<S>> RemAssign<Deg<S>> for Deg<S>`

[src]

`impl<S: BaseFloat + RemAssign<S>> RemAssign<Deg<S>> for Deg<S>`

`fn rem_assign(&mut self, other: Deg<S>)` | [src] |

`impl<S: BaseFloat> Sum<Deg<S>> for Deg<S>`

[src]

`impl<S: BaseFloat> Sum<Deg<S>> for Deg<S>`

`impl<'a, S: 'a + BaseFloat> Sum<&'a Deg<S>> for Deg<S>`

[src]

`impl<'a, S: 'a + BaseFloat> Sum<&'a Deg<S>> for Deg<S>`

`impl<S: BaseFloat> AbsDiffEq for Deg<S>`

[src]

`impl<S: BaseFloat> AbsDiffEq for Deg<S>`

`type Epsilon = S::Epsilon`

Used for specifying relative comparisons.

`fn default_epsilon() -> S::Epsilon` | [src] |

`fn abs_diff_eq(&self, other: &Self, epsilon: S::Epsilon) -> bool` | [src] |

`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]

`impl<S: BaseFloat> RelativeEq for Deg<S>`

`fn default_max_relative() -> S::Epsilon` | [src] |

`fn relative_eq(` | [src] |

`fn relative_ne(` | [src] |

The inverse of `ApproxEq::relative_eq`

.

`impl<S: BaseFloat> UlpsEq for Deg<S>`

[src]

`impl<S: BaseFloat> UlpsEq for Deg<S>`

`fn default_max_ulps() -> u32` | [src] |

`fn ulps_eq(&self, other: &Self, epsilon: S::Epsilon, max_ulps: u32) -> bool` | [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: Bounded> Bounded for Deg<S>`

`impl<S: BaseFloat> Zero for Deg<S>`

[src]

`impl<S: BaseFloat> Zero for Deg<S>`

`impl<S> Distribution<Deg<S>> for Standard where`

Standard: Distribution<S>,

S: BaseFloat + SampleUniform,

[src]

`impl<S> Distribution<Deg<S>> for Standard where`

Standard: Distribution<S>,

S: BaseFloat + SampleUniform,

## Auto Trait Implementations

## Blanket Implementations

`impl<T> From for T`

[src]

`impl<T> From for T`

`impl<T, U> Into for T where`

U: From<T>,

[src]

`impl<T, U> Into for T where`

U: From<T>,

`impl<T> ToOwned for T where`

T: Clone,

[src]

`impl<T> ToOwned for T where`

T: Clone,

`impl<T, U> TryFrom for T where`

T: From<U>,

[src]

`impl<T, U> TryFrom for T where`

T: From<U>,

`type Error = !`

`try_from`

)The type returned in the event of a conversion error.

`fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>` | [src] |

`impl<T> Borrow for T where`

T: ?Sized,

[src]

`impl<T> Borrow for T where`

T: ?Sized,

`impl<T> BorrowMut for T where`

T: ?Sized,

[src]

`impl<T> BorrowMut for T where`

T: ?Sized,

`fn borrow_mut(&mut self) -> &mut T` | [src] |

`impl<T, U> TryInto for T where`

U: TryFrom<T>,

[src]

`impl<T, U> TryInto for T where`

U: TryFrom<T>,

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

`try_from`

)The type returned in the event of a conversion error.

`fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>` | [src] |

`impl<T> Any for T where`

T: 'static + ?Sized,

[src]

`impl<T> Any for T where`

T: 'static + ?Sized,

`fn get_type_id(&self) -> TypeId` | [src] |

`impl<T, Rhs> NumAssignOps for T where`

T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

[src]

`impl<T, Rhs> NumAssignOps for T where`

T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,