pub struct Degrees(pub f64);
Expand description
The Degrees newtype an f64.
Tuple Fields§
§0: f64
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Degrees
impl<'de> Deserialize<'de> for Degrees
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 From<Degrees> for Angle
impl From<Degrees> for Angle
Source§fn from(a: Degrees) -> Self
fn from(a: Degrees) -> Self
Construct an Angle
from an angle in Degrees.
Examples:
use angle_sc::{Angle, Degrees, is_within_tolerance, trig};
let angle = Angle::from(Degrees(60.0));
assert_eq!(trig::COS_30_DEGREES, angle.sin().0);
assert_eq!(0.5, angle.cos().0);
assert_eq!(60.0, Degrees::from(angle).0);
impl Copy for Degrees
impl StructuralPartialEq for Degrees
Auto Trait Implementations§
impl Freeze for Degrees
impl RefUnwindSafe for Degrees
impl Send for Degrees
impl Sync for Degrees
impl Unpin for Degrees
impl UnwindSafe for Degrees
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