pub struct MomentOfInertia(/* private fields */);Expand description
A moment of inertia (rotational inertia), stored canonically in kg*m².
§Construction
use space_units::MomentOfInertia;
let i = MomentOfInertia::from_kgm2(12.5);
let i2 = MomentOfInertia::from_slug_ft2(9.2);§Typed arithmetic
| Expression | Result |
|---|---|
MomentOfInertia * AngularAcceleration | Torque |
Implementations§
Source§impl MomentOfInertia
impl MomentOfInertia
Sourcepub const fn from_kgm2(val: f64) -> Self
pub const fn from_kgm2(val: f64) -> Self
Creates a moment of inertia from a value in kilogram-metres squared.
Sourcepub const fn from_gcm2(val: f64) -> Self
pub const fn from_gcm2(val: f64) -> Self
Creates a moment of inertia from a value in gram-centimetres squared.
Sourcepub const fn from_slug_ft2(val: f64) -> Self
pub const fn from_slug_ft2(val: f64) -> Self
Creates a moment of inertia from a value in slug-feet squared.
Sourcepub const fn in_slug_ft2(self) -> f64
pub const fn in_slug_ft2(self) -> f64
Returns the moment of inertia in slug-feet squared.
Sourcepub const fn display_as(self, unit: MomentOfInertiaUnit) -> DisplayWithUnit
pub const fn display_as(self, unit: MomentOfInertiaUnit) -> DisplayWithUnit
Returns a display wrapper that formats the moment of inertia in the specified unit.
Trait Implementations§
Source§impl Add for MomentOfInertia
impl Add for MomentOfInertia
Source§impl AddAssign for MomentOfInertia
impl AddAssign for MomentOfInertia
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Clone for MomentOfInertia
impl Clone for MomentOfInertia
Source§fn clone(&self) -> MomentOfInertia
fn clone(&self) -> MomentOfInertia
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 MomentOfInertia
impl Debug for MomentOfInertia
Source§impl Default for MomentOfInertia
impl Default for MomentOfInertia
Source§fn default() -> MomentOfInertia
fn default() -> MomentOfInertia
Returns the “default value” for a type. Read more
Source§impl Display for MomentOfInertia
impl Display for MomentOfInertia
Source§impl Div<f64> for MomentOfInertia
impl Div<f64> for MomentOfInertia
Source§impl Div for MomentOfInertia
impl Div for MomentOfInertia
Source§impl DivAssign<f64> for MomentOfInertia
impl DivAssign<f64> for MomentOfInertia
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/= operation. Read moreSource§impl Mul<AngularAcceleration> for MomentOfInertia
impl Mul<AngularAcceleration> for MomentOfInertia
Source§impl Mul<MomentOfInertia> for AngularAcceleration
impl Mul<MomentOfInertia> for AngularAcceleration
Source§impl Mul<MomentOfInertia> for f64
impl Mul<MomentOfInertia> for f64
Source§type Output = MomentOfInertia
type Output = MomentOfInertia
The resulting type after applying the
* operator.Source§fn mul(self, rhs: MomentOfInertia) -> MomentOfInertia
fn mul(self, rhs: MomentOfInertia) -> MomentOfInertia
Performs the
* operation. Read moreSource§impl Mul<f64> for MomentOfInertia
impl Mul<f64> for MomentOfInertia
Source§impl MulAssign<f64> for MomentOfInertia
impl MulAssign<f64> for MomentOfInertia
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*= operation. Read moreSource§impl Neg for MomentOfInertia
impl Neg for MomentOfInertia
Source§impl PartialEq for MomentOfInertia
impl PartialEq for MomentOfInertia
Source§impl PartialOrd for MomentOfInertia
impl PartialOrd for MomentOfInertia
Source§impl Sub for MomentOfInertia
impl Sub for MomentOfInertia
Source§impl SubAssign for MomentOfInertia
impl SubAssign for MomentOfInertia
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreSource§impl Sum for MomentOfInertia
impl Sum for MomentOfInertia
impl Copy for MomentOfInertia
impl StructuralPartialEq for MomentOfInertia
Auto Trait Implementations§
impl Freeze for MomentOfInertia
impl RefUnwindSafe for MomentOfInertia
impl Send for MomentOfInertia
impl Sync for MomentOfInertia
impl Unpin for MomentOfInertia
impl UnsafeUnpin for MomentOfInertia
impl UnwindSafe for MomentOfInertia
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