Skip to content

Commit

Permalink
more PR feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Jun 21, 2024
1 parent e4e3135 commit 4dcd38e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Fix

- Fix `NaN` values appearin in bodies translation and rotation after a simulation step with a delta time equal to 0 ([#660](https://github.com/dimforge/rapier/pull/660)).
- Fix `NaN` values appearing in bodies translation and rotation after a simulation step with a delta time equal to 0 ([#660](https://github.com/dimforge/rapier/pull/660)).

## v0.20.0 (9 June 2024)

Expand Down
14 changes: 7 additions & 7 deletions src/pipeline/physics_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -961,16 +961,16 @@ mod test {
// Add joint
#[cfg(feature = "dim2")]
let joint = RevoluteJointBuilder::new()
.local_anchor1(point![0.0, 1.0].into())
.local_anchor2(point![0.0, -3.0].into());
.local_anchor1(point![0.0, 1.0])
.local_anchor2(point![0.0, -3.0]);
#[cfg(feature = "dim3")]
let joint = RevoluteJointBuilder::new(Vector::z_axis())
.local_anchor1(point![0.0, 1.0, 0.0].into())
.local_anchor2(point![0.0, -3.0, 0.0].into());
.local_anchor1(point![0.0, 1.0, 0.0])
.local_anchor2(point![0.0, -3.0, 0.0]);
impulse_joints.insert(h, h_dynamic, joint, true);

let mut parameters = IntegrationParameters::default();
parameters.dt = 0f32.into();
parameters.dt = 0.0;
// Step once
let gravity = Vector::y() * -9.81;
pipeline.step(
Expand All @@ -988,8 +988,8 @@ mod test {
&(),
&(),
);
let translation = bodies.get(h_dynamic).unwrap().translation();
let rotation = bodies.get(h_dynamic).unwrap().rotation();
let translation = bodies[h_dynamic].translation();
let rotation = bodies[h_dynamic].rotation();
assert!(translation.x.is_finite());
assert!(translation.y.is_finite());
#[cfg(feature = "dim2")]
Expand Down

0 comments on commit 4dcd38e

Please sign in to comment.