pub struct Angle(/* private fields */);
Expand description
Represents an angle in degrees or radians.
Implementations§
source§impl Angle
impl Angle
sourcepub fn from_degrees(degrees: f32) -> Self
pub fn from_degrees(degrees: f32) -> Self
Creates a new angle from degrees.
sourcepub fn from_radians(radians: f32) -> Self
pub fn from_radians(radians: f32) -> Self
Creates a new angle from radians.
sourcepub fn from_gradians(gradians: f32) -> Self
pub fn from_gradians(gradians: f32) -> Self
Creates a new angle from gradians.
sourcepub fn from_turns(turns: f32) -> Self
pub fn from_turns(turns: f32) -> Self
Creates a new angle from turns.
sourcepub fn to_radians(self) -> f32
pub fn to_radians(self) -> f32
Returns the angle in radians.
sourcepub fn to_degrees(self) -> f32
pub fn to_degrees(self) -> f32
Returns the angle in degrees.
Trait Implementations§
impl 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)