pub struct Angle(pub f32);Expand description
An angle stored in degrees.
Interpolation follows the shortest angular path, so 359deg to 1deg
moves forward by two degrees instead of backward by 358 degrees.
Tuple Fields§
§0: f32Implementations§
Source§impl Angle
impl Angle
Sourcepub fn from_degrees(degrees: f32) -> Self
pub fn from_degrees(degrees: f32) -> Self
Create an angle from degrees.
Sourcepub fn from_radians(radians: f32) -> Self
pub fn from_radians(radians: f32) -> Self
Create an angle from radians.
Sourcepub fn normalized(self) -> Self
pub fn normalized(self) -> Self
Return an equivalent angle in [0, 360).
Trait Implementations§
impl Copy for Angle
Source§impl Interpolate for Angle
impl Interpolate for Angle
impl StructuralPartialEq for Angle
Auto Trait Implementations§
impl Freeze 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§
impl<T> Animatable for Twhere
T: Interpolate + Clone + 'static,
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