# [−][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]

#### `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: 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: 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> 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> 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

## Blanket Implementations

### `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, 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.