Skip to content

Commit

Permalink
Fix atRest with negative forces
Browse files Browse the repository at this point in the history
  • Loading branch information
cam72cam committed Oct 6, 2023
1 parent da7a010 commit 90bbdec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ public double forcesNewtons() {
}

public boolean atRest() {
return velocity == 0 && forcesNewtons() < frictionNewtons();
return velocity == 0 && Math.abs(forcesNewtons()) < frictionNewtons();
}

public double frictionNewtons() {
Expand Down

0 comments on commit 90bbdec

Please sign in to comment.