pub struct Angle(/* private fields */);Expand description
Angle in radians.
Implementations§
Source§impl Angle
impl Angle
Sourcepub const fn radians_normalized(rad: f64) -> Angle
pub const fn radians_normalized(rad: f64) -> Angle
Creates a new angle from an f64 value in radians and normalize the angle
to the interval [0.0, 2π).
Sourcepub const fn radians_normalized_signed(rad: f64) -> Angle
pub const fn radians_normalized_signed(rad: f64) -> Angle
Creates a new angle from an f64 value in radians and normalize the angle
to the interval (-2π, 2π).
Sourcepub const fn from_hms(hours: i64, minutes: u8, seconds: f64) -> Angle
pub const fn from_hms(hours: i64, minutes: u8, seconds: f64) -> Angle
Creates a new angle from hours, minutes, and seconds (HMS notation).
Sourcepub const fn degrees_normalized(deg: f64) -> Angle
pub const fn degrees_normalized(deg: f64) -> Angle
Creates a new angle from an f64 value in degrees and normalize the angle
to the interval [0.0, 2π).
Sourcepub const fn degrees_normalized_signed(deg: f64) -> Angle
pub const fn degrees_normalized_signed(deg: f64) -> Angle
Creates a new angle from an f64 value in degrees and normalize the angle
to the interval (-2π, 2π).
Sourcepub const fn arcseconds(asec: f64) -> Angle
pub const fn arcseconds(asec: f64) -> Angle
Creates a new angle from an f64 value in arcseconds.
Sourcepub const fn arcseconds_normalized(asec: f64) -> Angle
pub const fn arcseconds_normalized(asec: f64) -> Angle
Creates a new angle from an f64 value in arcseconds and normalize the angle
to the interval [0.0, 2π).
Sourcepub const fn arcseconds_normalized_signed(asec: f64) -> Angle
pub const fn arcseconds_normalized_signed(asec: f64) -> Angle
Creates a new angle from an f64 value in arcseconds and normalize the angle
to the interval (-2π, 2π).
Sourcepub fn from_asinh(value: f64) -> Angle
pub fn from_asinh(value: f64) -> Angle
Creates an angle from the inverse hyperbolic sine of a value.
Sourcepub fn from_acosh(value: f64) -> Angle
pub fn from_acosh(value: f64) -> Angle
Creates an angle from the inverse hyperbolic cosine of a value.
Sourcepub fn from_atanh(value: f64) -> Angle
pub fn from_atanh(value: f64) -> Angle
Creates an angle from the inverse hyperbolic tangent of a value.
Sourcepub fn from_atan2(y: f64, x: f64) -> Angle
pub fn from_atan2(y: f64, x: f64) -> Angle
Creates an angle from the two-argument arctangent of y and x.
Sourcepub const fn mod_two_pi(&self) -> Angle
pub const fn mod_two_pi(&self) -> Angle
Returns a new angle that is normalized to the interval [0.0, 2π).
Sourcepub const fn mod_two_pi_signed(&self) -> Angle
pub const fn mod_two_pi_signed(&self) -> Angle
Returns a new angle that is normalized to the interval (-2π, 2π).
Sourcepub const fn normalize_two_pi(&self, center: Angle) -> Angle
pub const fn normalize_two_pi(&self, center: Angle) -> Angle
Returns a new angle that is normalized to a (-π, π) interval
centered around center.
Sourcepub const fn to_radians(&self) -> f64
pub const fn to_radians(&self) -> f64
Returns the value of the angle in radians.
Sourcepub const fn to_degrees(&self) -> f64
pub const fn to_degrees(&self) -> f64
Returns the value of the angle in degrees.
Sourcepub const fn to_arcseconds(&self) -> f64
pub const fn to_arcseconds(&self) -> f64
Returns the value of the angle in arcseconds.
Sourcepub fn rotation_x(&self) -> DMat3
pub fn rotation_x(&self) -> DMat3
Returns the 3×3 rotation matrix for a rotation about the X axis.
Sourcepub fn rotation_y(&self) -> DMat3
pub fn rotation_y(&self) -> DMat3
Returns the 3×3 rotation matrix for a rotation about the Y axis.
Sourcepub fn rotation_z(&self) -> DMat3
pub fn rotation_z(&self) -> DMat3
Returns the 3×3 rotation matrix for a rotation about the Z axis.
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)
+= 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, rhs: Angle)
fn sub_assign(&mut self, rhs: Angle)
-= 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.