Skip to content

Commit

Permalink
doc: specifiy that inv_principal_inertia_sqrt is calculated relative …
Browse files Browse the repository at this point in the history
…to the center of mass
  • Loading branch information
sebcrozet committed Mar 23, 2024
1 parent e57762f commit 797dead
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mass_properties/mass_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub struct MassProperties {
pub inv_mass: Real,
/// The inverse of the principal angular inertia of the rigid-body.
///
/// The angular inertia is calculated relative to [`Self::local_com`].
/// Components set to zero are assumed to be infinite along the corresponding principal axis.
pub inv_principal_inertia_sqrt: AngVector<Real>,
#[cfg(feature = "dim3")]
Expand Down Expand Up @@ -116,7 +117,7 @@ impl MassProperties {
utils::inv(self.inv_mass)
}

/// The angular inertia along the principal inertia axes of the rigid-body.
/// The angular inertia along the principal inertia axes and center of mass of the rigid-body.
pub fn principal_inertia(&self) -> AngVector<Real> {
#[cfg(feature = "dim2")]
return utils::inv(self.inv_principal_inertia_sqrt * self.inv_principal_inertia_sqrt);
Expand Down

0 comments on commit 797dead

Please sign in to comment.