Skip to content

Commit b364de4

Browse files
committed
core: fix assert
`distance_lower_bound` may be initialized with a lower value than the one contained in sqrDistLowerBound.
1 parent 4031c79 commit b364de4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/collision_node.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ void collide(CollisionTraversalNodeBase* node, const CollisionRequest& request,
5959
if (sqrDistLowerBound == 0) {
6060
assert(result.distance_lower_bound <= 0);
6161
} else {
62-
assert(fabs(sqrDistLowerBound -
63-
result.distance_lower_bound * result.distance_lower_bound) <
62+
assert(result.distance_lower_bound * result.distance_lower_bound -
63+
sqrDistLowerBound <
6464
1e-8);
6565
}
6666
}

0 commit comments

Comments
 (0)