pub struct Angle(/* private fields */);Expand description
Angle in radians.
Implementations§
Source§impl Angle
impl Angle
Sourcepub const fn radians_normalized(rad: f64) -> Self
pub const fn radians_normalized(rad: f64) -> Self
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) -> Self
pub const fn radians_normalized_signed(rad: f64) -> Self
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) -> Self
pub const fn from_hms(hours: i64, minutes: u8, seconds: f64) -> Self
Creates a new angle from hours, minutes, and seconds (HMS notation).
Sourcepub const fn degrees_normalized(deg: f64) -> Self
pub const fn degrees_normalized(deg: f64) -> Self
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) -> Self
pub const fn degrees_normalized_signed(deg: f64) -> Self
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) -> Self
pub const fn arcseconds(asec: f64) -> Self
Creates a new angle from an f64 value in arcseconds.
Sourcepub const fn arcseconds_normalized(asec: f64) -> Self
pub const fn arcseconds_normalized(asec: f64) -> Self
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) -> Self
pub const fn arcseconds_normalized_signed(asec: f64) -> Self
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) -> Self
pub fn from_asinh(value: f64) -> Self
Creates an angle from the inverse hyperbolic sine of a value.
Sourcepub fn from_acosh(value: f64) -> Self
pub fn from_acosh(value: f64) -> Self
Creates an angle from the inverse hyperbolic cosine of a value.
Sourcepub fn from_atanh(value: f64) -> Self
pub fn from_atanh(value: f64) -> Self
Creates an angle from the inverse hyperbolic tangent of a value.
Sourcepub fn from_atan2(y: f64, x: f64) -> Self
pub fn from_atan2(y: f64, x: f64) -> Self
Creates an angle from the two-argument arctangent of y and x.
Sourcepub const fn mod_two_pi(&self) -> Self
pub const fn mod_two_pi(&self) -> Self
Returns a new angle that is normalized to the interval [0.0, 2π).
Sourcepub const fn mod_two_pi_signed(&self) -> Self
pub const fn mod_two_pi_signed(&self) -> Self
Returns a new angle that is normalized to the interval (-2π, 2π).
Sourcepub const fn normalize_two_pi(&self, center: Self) -> Self
pub const fn normalize_two_pi(&self, center: Self) -> Self
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: Self)
fn add_assign(&mut self, rhs: Self)
+= 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: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read more