Enum statics::Angle [] [src]

pub enum Angle {
    Rad(f64),
    Deg(f64),
}

Type that represents an angle in either Degrees or Radians.

Conversion methods are provided.

use statics::Angle;
use std::f64::consts::PI;
let deg_angle = Angle::Deg(180.0);
assert_eq!(f64::from(deg_angle.as_rad()), PI);

Variants

Radians

Degrees

Methods

impl Angle
[src]

[src]

returns the angle as a radian angle

[src]

returns the angle as a degree angle

Trait Implementations

impl Debug for Angle
[src]

[src]

Formats the value using the given formatter. Read more

impl From<Angle> for f64
[src]

[src]

Performs the conversion.

impl PartialEq<Angle> for Angle
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

Auto Trait Implementations

impl Send for Angle

impl Sync for Angle