pub struct AngularVelocity(/* private fields */);Expand description
An angular velocity (rate of rotation), stored canonically in rad/s.
§Construction
use space_units::AngularVelocity;
let w = AngularVelocity::from_rpm(3600.0);
let w2 = AngularVelocity::from_radps(1.0);§Typed arithmetic
| Expression | Result |
|---|---|
AngularVelocity * Time | Angle |
AngularVelocity / Time | AngularAcceleration |
Implementations§
Source§impl AngularVelocity
impl AngularVelocity
Sourcepub const fn from_radps(val: f64) -> Self
pub const fn from_radps(val: f64) -> Self
Creates an angular velocity from a value in radians per second.
Sourcepub const fn from_degps(val: f64) -> Self
pub const fn from_degps(val: f64) -> Self
Creates an angular velocity from a value in degrees per second.
Sourcepub const fn from_rpm(val: f64) -> Self
pub const fn from_rpm(val: f64) -> Self
Creates an angular velocity from a value in revolutions per minute.
Sourcepub const fn from_revps(val: f64) -> Self
pub const fn from_revps(val: f64) -> Self
Creates an angular velocity from a value in revolutions per second.
Sourcepub fn in_unit(self, unit: AngularVelocityUnit) -> f64
pub fn in_unit(self, unit: AngularVelocityUnit) -> f64
Returns the angular velocity in the specified AngularVelocityUnit.
Sourcepub fn display_as(self, unit: AngularVelocityUnit) -> DisplayWithUnit
pub fn display_as(self, unit: AngularVelocityUnit) -> DisplayWithUnit
Returns a display wrapper that formats the angular velocity in the specified unit.
Trait Implementations§
Source§impl Add for AngularVelocity
impl Add for AngularVelocity
Source§impl AddAssign for AngularVelocity
impl AddAssign for AngularVelocity
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Clone for AngularVelocity
impl Clone for AngularVelocity
Source§fn clone(&self) -> AngularVelocity
fn clone(&self) -> AngularVelocity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AngularVelocity
impl Debug for AngularVelocity
Source§impl Default for AngularVelocity
impl Default for AngularVelocity
Source§fn default() -> AngularVelocity
fn default() -> AngularVelocity
Returns the “default value” for a type. Read more
Source§impl Display for AngularVelocity
impl Display for AngularVelocity
Source§impl Div<Time> for AngularVelocity
impl Div<Time> for AngularVelocity
Source§type Output = AngularAcceleration
type Output = AngularAcceleration
The resulting type after applying the
/ operator.Source§impl Div<f64> for AngularVelocity
impl Div<f64> for AngularVelocity
Source§impl Div for AngularVelocity
impl Div for AngularVelocity
Source§impl DivAssign<f64> for AngularVelocity
impl DivAssign<f64> for AngularVelocity
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/= operation. Read moreSource§impl Mul<AngularVelocity> for Time
impl Mul<AngularVelocity> for Time
Source§impl Mul<AngularVelocity> for f64
impl Mul<AngularVelocity> for f64
Source§type Output = AngularVelocity
type Output = AngularVelocity
The resulting type after applying the
* operator.Source§fn mul(self, rhs: AngularVelocity) -> AngularVelocity
fn mul(self, rhs: AngularVelocity) -> AngularVelocity
Performs the
* operation. Read moreSource§impl Mul<Time> for AngularVelocity
impl Mul<Time> for AngularVelocity
Source§impl Mul<f64> for AngularVelocity
impl Mul<f64> for AngularVelocity
Source§impl MulAssign<f64> for AngularVelocity
impl MulAssign<f64> for AngularVelocity
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*= operation. Read moreSource§impl Neg for AngularVelocity
impl Neg for AngularVelocity
Source§impl PartialEq for AngularVelocity
impl PartialEq for AngularVelocity
Source§impl PartialOrd for AngularVelocity
impl PartialOrd for AngularVelocity
Source§impl Sub for AngularVelocity
impl Sub for AngularVelocity
Source§impl SubAssign for AngularVelocity
impl SubAssign for AngularVelocity
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreSource§impl Sum for AngularVelocity
impl Sum for AngularVelocity
impl Copy for AngularVelocity
impl StructuralPartialEq for AngularVelocity
Auto Trait Implementations§
impl Freeze for AngularVelocity
impl RefUnwindSafe for AngularVelocity
impl Send for AngularVelocity
impl Sync for AngularVelocity
impl Unpin for AngularVelocity
impl UnsafeUnpin for AngularVelocity
impl UnwindSafe for AngularVelocity
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