Add params.velocity_based_erp_inv_dt() helper

This commit is contained in:
Emil Ernerfeldt
2021-02-17 19:08:43 +01:00
parent 21247a1236
commit 4162aed2a0
5 changed files with 29 additions and 35 deletions

View File

@@ -181,6 +181,12 @@ impl IntegrationParameters {
self.dt = 1.0 / inv_dt
}
}
/// Convenience: `velocity_based_erp / dt`
#[inline]
pub(crate) fn velocity_based_erp_inv_dt(&self) -> Real {
self.velocity_based_erp * self.inv_dt()
}
}
impl Default for IntegrationParameters {