pub struct Angle {
pub radians: f64,
pub original_unit: String,
}Expand description
Poka-Yoke angle with mandatory explicit units [56].
Fields§
§radians: f64Value in radians (canonical unit).
original_unit: StringOriginal unit string for display.
Implementations§
Source§impl Angle
impl Angle
Sourcepub fn from_radians(value: f64) -> Self
pub fn from_radians(value: f64) -> Self
Create angle from radians.
Sourcepub fn from_degrees(value: f64) -> Self
pub fn from_degrees(value: f64) -> Self
Create angle from degrees.
Sourcepub const fn as_radians(&self) -> f64
pub const fn as_radians(&self) -> f64
Get value in radians.
Sourcepub fn as_degrees(&self) -> f64
pub fn as_degrees(&self) -> f64
Get value in degrees.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Angle
impl<'de> Deserialize<'de> for Angle
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more