pub struct Angle(/* private fields */);
Expand description
An angle between two vectors.
Used by draw_arc
and draw_sector
.
Implementations§
Source§impl Angle
impl Angle
Sourcepub const FULL_CIRCLE: Angle
pub const FULL_CIRCLE: Angle
The 360° angle.
Sourcepub const HALF_CIRCLE: Angle
pub const HALF_CIRCLE: Angle
The 180° angle.
Sourcepub const QUARTER_CIRCLE: Angle
pub const QUARTER_CIRCLE: Angle
The 90° angle.
Sourcepub fn from_degrees(d: f32) -> Self
pub fn from_degrees(d: f32) -> Self
An angle in degrees where 360.0 is the full circle.
Sourcepub const fn from_radians(r: f32) -> Self
pub const fn from_radians(r: f32) -> Self
Sourcepub fn normalize(self) -> Self
pub fn normalize(self) -> Self
Normalize the angle to less than one full rotation (in the range 0°..360°).
Sourcepub fn to_degrees(self) -> f32
pub fn to_degrees(self) -> f32
Get the angle value in degrees where 360.0 is the full circle..
Sourcepub const fn to_radians(self) -> f32
pub const fn to_radians(self) -> f32
Trait Implementations§
Source§impl AddAssign for Angle
impl AddAssign for Angle
Source§fn add_assign(&mut self, other: Angle)
fn add_assign(&mut self, other: Angle)
Performs the
+=
operation. Read moreSource§impl PartialOrd for Angle
impl PartialOrd for Angle
Source§impl SubAssign for Angle
impl SubAssign for Angle
Source§fn sub_assign(&mut self, other: Angle)
fn sub_assign(&mut self, other: Angle)
Performs the
-=
operation. Read moreimpl Copy 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 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