`pub struct Angle(f64);`

## Expand description

An angle, stored in radians.

## Tuple Fields

`0: f64`

## Implementations

source### impl Angle

### impl Angle

#### pub const ZERO: Angle = _

#### pub(crate) fn invert_y(self) -> Angle

source#### pub fn rotate_degs(self, degrees: f64) -> Angle

#### pub fn rotate_degs(self, degrees: f64) -> Angle

Rotates this angle by some degrees.

source#### pub fn normalized_radians(self) -> f64

#### pub fn normalized_radians(self) -> f64

Returns [0, 2pi)

source#### pub fn normalized_degrees(self) -> f64

#### pub fn normalized_degrees(self) -> f64

Returns [0, 360)

source#### pub fn simple_shortest_rotation_towards(self, other: Angle) -> f64

#### pub fn simple_shortest_rotation_towards(self, other: Angle) -> f64

Returns [-180, 180]

source#### pub fn shortest_rotation_towards(self, other: Angle) -> Angle

#### pub fn shortest_rotation_towards(self, other: Angle) -> Angle

Logically this returns [-180, 180], but keep in mind when we print this angle, it’ll normalize to be [0, 360].

source#### pub fn approx_eq(self, other: Angle, within_degrees: f64) -> bool

#### pub fn approx_eq(self, other: Angle, within_degrees: f64) -> bool

True if this angle is within some degrees of another, accounting for rotation

source#### pub fn approx_parallel(self, other: Angle, within_degrees: f64) -> bool

#### pub fn approx_parallel(self, other: Angle, within_degrees: f64) -> bool

True if this angle is within some degrees of another, accounting for rotation and allowing two angles that point in opposite directions

## Trait Implementations

source### impl<'de> Deserialize<'de> for Angle

### impl<'de> Deserialize<'de> for Angle

source#### fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where

__D: Deserializer<'de>,

#### fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where

__D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

source### impl PartialOrd<Angle> for Angle

### impl PartialOrd<Angle> for Angle

source#### fn partial_cmp(&self, other: &Angle) -> Option<Ordering>

#### fn partial_cmp(&self, other: &Angle) -> Option<Ordering>

1.0.0 · source#### fn le(&self, other: &Rhs) -> bool

#### fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for

`self`

and `other`

) and is used by the `<=`

operator. Read more### impl Copy for Angle

### impl StructuralPartialEq for Angle

## Auto Trait Implementations

### impl RefUnwindSafe for Angle

### impl Send for Angle

### impl Sync for Angle

### impl Unpin for Angle

### impl UnwindSafe for Angle

## Blanket Implementations

source### impl<T> BorrowMut<T> for Twhere

T: ?Sized,

### impl<T> BorrowMut<T> for Twhere

T: ?Sized,

const: unstable · source#### fn borrow_mut(&mut self) -> &mut T

#### fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more