Skip to content

Commit

Permalink
core: fix assert
Browse files Browse the repository at this point in the history
`distance_lower_bound` may be initialized with a lower value than the one contained in sqrDistLowerBound.
  • Loading branch information
jcarpent committed Jun 5, 2022
1 parent 19ed036 commit 2524ea5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/collision_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ void collide(CollisionTraversalNodeBase* node, const CollisionRequest& request,
if (sqrDistLowerBound == 0) {
assert(result.distance_lower_bound <= 0);
} else {
assert(fabs(sqrDistLowerBound -
result.distance_lower_bound * result.distance_lower_bound) <
assert(result.distance_lower_bound * result.distance_lower_bound -
sqrDistLowerBound <
1e-8);
}
}
Expand Down

0 comments on commit 2524ea5

Please sign in to comment.