pub struct Angle(/* private fields */);Expand description
An angle: one type for every rotation, arc, sweep and gradient start in Day, so a call site
says its unit (Angle::deg(90.0), Angle::rad(PI / 2.0)) and no parameter can be read in
the wrong one. Nothing converts into an Angle implicitly.
Day’s angles are screen angles: 0 points along +x and positive turns clockwise, because
y grows downward. The value is kept in degrees, so Angle::deg(d).degrees() returns d
exactly; Angle::radians converts.
Implementations§
Trait Implementations§
Source§impl AddAssign for Angle
impl AddAssign for Angle
Source§fn add_assign(&mut self, rhs: Angle)
fn add_assign(&mut self, rhs: Angle)
Performs the
+= operation. Read moreimpl Copy for Angle
Source§impl PartialOrd for Angle
impl PartialOrd for Angle
impl StructuralPartialEq for Angle
Auto Trait Implementations§
impl Forget for Angle
impl Freeze for Angle
impl Move for Angle
impl RefUnwindSafe for Angle
impl Send for Angle
impl Sync for Angle
impl Unpin for Angle
impl UnsafeUnpin 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