pub struct AngularVelocity { /* private fields */ }
Expand description
The ‘AngularVelocity’ struct can be used to deal with angular velocities in a common way.
§Example
use measurements::AngularVelocity;
const cylinders: f64 = 6.0;
let engine_speed = AngularVelocity::from_rpm(9000.0);
let sparks_per_second = (engine_speed.as_hertz() / 2.0) * cylinders;
Implementations§
Source§impl AngularVelocity
impl AngularVelocity
Sourcepub fn from_radians_per_second(radians_per_second: f64) -> Self
pub fn from_radians_per_second(radians_per_second: f64) -> Self
Create a new AngularVelocity from a floating point value in radians per second
Sourcepub fn from_rpm(rpm: f64) -> Self
pub fn from_rpm(rpm: f64) -> Self
Create a new AngularVelocity from a floating point value in revolutions per minute (RPM)
Sourcepub fn from_hertz(hz: f64) -> Self
pub fn from_hertz(hz: f64) -> Self
Create a new AngularVelocity from a floating point value in revolutions per second (Hz)
Sourcepub fn as_radians_per_second(&self) -> f64
pub fn as_radians_per_second(&self) -> f64
Convert this AngularVelocity to a floating point value in radians per second
Trait Implementations§
Source§impl Add for AngularVelocity
impl Add for AngularVelocity
Source§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 Display for AngularVelocity
impl Display for AngularVelocity
Source§impl Div<AngularVelocity> for Power
impl Div<AngularVelocity> for Power
Source§impl Div<f64> for AngularVelocity
impl Div<f64> for AngularVelocity
Source§impl Div for AngularVelocity
impl Div for AngularVelocity
Source§impl Measurement for AngularVelocity
impl Measurement for AngularVelocity
Source§fn as_base_units(&self) -> f64
fn as_base_units(&self) -> f64
Get this quantity in the base units
Source§fn from_base_units(units: f64) -> Self
fn from_base_units(units: f64) -> Self
Create a new quantity from the base units
Source§fn get_base_units_name(&self) -> &'static str
fn get_base_units_name(&self) -> &'static str
Return the base unit for this type, as a string.
For example “kilograms”
Source§fn get_appropriate_units(&self) -> (&'static str, f64)
fn get_appropriate_units(&self) -> (&'static str, f64)
Returns a string containing the most appropriate units for this quantity,
and a floating point value representing this quantity in those units.
Useful when, for example, a length might be in millimeters if it is very small,
or kilometers when it is very large. Read more
Source§impl Mul<AngularVelocity> for Torque
impl Mul<AngularVelocity> for Torque
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<Torque> for AngularVelocity
impl Mul<Torque> for AngularVelocity
Source§impl Mul<f64> for AngularVelocity
impl Mul<f64> 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
impl Copy for AngularVelocity
impl Eq 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 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