Struct runtime_units::Angle
source · pub struct Angle {
pub value: f64,
pub unit: AngleUnit,
}Expand description
Angle (dimensionless quantity).
Fields§
§value: f64§unit: AngleUnitImplementations§
source§impl Angle
impl Angle
pub fn new(value: f64, unit: AngleUnit) -> Self
sourcepub fn radian(value: f64) -> Self
pub fn radian(value: f64) -> Self
Create a new Angle with units of AngleUnit::radian.
sourcepub fn revolution(value: f64) -> Self
pub fn revolution(value: f64) -> Self
Create a new Angle with units of AngleUnit::revolution.
sourcepub fn degree(value: f64) -> Self
pub fn degree(value: f64) -> Self
Create a new Angle with units of AngleUnit::degree.
sourcepub fn gon(value: f64) -> Self
pub fn gon(value: f64) -> Self
Create a new Angle with units of AngleUnit::gon.
sourcepub fn mil(value: f64) -> Self
pub fn mil(value: f64) -> Self
Create a new Angle with units of AngleUnit::mil.
sourcepub fn minute(value: f64) -> Self
pub fn minute(value: f64) -> Self
Create a new Angle with units of AngleUnit::minute.
sourcepub fn second(value: f64) -> Self
pub fn second(value: f64) -> Self
Create a new Angle with units of AngleUnit::second.
sourcepub fn to_quantity(&self) -> Quantity
pub fn to_quantity(&self) -> Quantity
Trait Implementations§
source§impl From<Angle> for AngleQuantity
impl From<Angle> for AngleQuantity
source§impl PartialEq for Angle
impl PartialEq for Angle
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§
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