Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
  • Loading branch information
luca-della-vedova committed Jun 12, 2024
1 parent bc50892 commit 0e5e43b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions rmf_site_format/src/lift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,16 @@ impl<T: RefTrait> LiftCabin<T> {

pub fn moment_of_inertia(&self, mass: f64) -> sdformat_rs::SdfInertialInertia {
match self {
Self::Rect(params) => {
sdformat_rs::SdfInertialInertia {
ixx: mass/12.0 * (params.width.powi(2) + DEFAULT_CABIN_WALL_THICKNESS.powi(2)) as f64,
iyy: mass/12.0 * (params.depth.powi(2) + DEFAULT_CABIN_WALL_THICKNESS.powi(2)) as f64,
izz: mass/12.0 * (params.width.powi(2) + params.depth.powi(2)) as f64,
ixy: 0.0,
ixz: 0.0,
iyz: 0.0,
}
}
Self::Rect(params) => sdformat_rs::SdfInertialInertia {
ixx: mass / 12.0
* (params.width.powi(2) + DEFAULT_CABIN_WALL_THICKNESS.powi(2)) as f64,
iyy: mass / 12.0
* (params.depth.powi(2) + DEFAULT_CABIN_WALL_THICKNESS.powi(2)) as f64,
izz: mass / 12.0 * (params.width.powi(2) + params.depth.powi(2)) as f64,
ixy: 0.0,
ixz: 0.0,
iyz: 0.0,
},
}
}
}
Expand Down

0 comments on commit 0e5e43b

Please sign in to comment.