pub enum Angle {
Rad(f64),
Deg(f64),
}
Expand description
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§
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Angle
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,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more