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
Rad(f64)
Radians
Deg(f64)
Degrees
Methods
impl Angle
[src]
pub fn as_rad(&self) -> Self
[src]
returns the angle as a radian angle
pub fn as_deg(&self) -> Self
[src]
returns the angle as a degree angle
Trait Implementations
impl Debug for Angle
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more