Struct orbtk_utils::Angle
source · [−]pub struct Angle(_);
Expand description
The OrbTk way to handle angles
Implementations
sourceimpl Angle
impl Angle
pub fn from_radians(radians: f64) -> Angle
pub fn from_degrees(degrees: f64) -> Angle
sourcepub fn from_turn(turn: f64) -> Angle
pub fn from_turn(turn: f64) -> Angle
Takes a number between 0.0 and 1.0 where 0.0 represents 0 degrees and 1.0 360 degrees
pub fn to_radians(self) -> f64
pub fn to_degrees(self) -> f64
Trait Implementations
impl Copy for Angle
impl StructuralPartialEq for Angle
Auto Trait Implementations
impl RefUnwindSafe for Angle
impl Send for Angle
impl Sync for Angle
impl Unpin for Angle
impl UnwindSafe for Angle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more