diff --git a/include/fcl/narrowphase/distance-inl.h b/include/fcl/narrowphase/distance-inl.h index 3244631e3..af39bae06 100644 --- a/include/fcl/narrowphase/distance-inl.h +++ b/include/fcl/narrowphase/distance-inl.h @@ -163,7 +163,7 @@ typename NarrowPhaseSolver::S distance( assert(collision_result.isCollision()); std::size_t index = static_cast(-1); - S max_pen_depth = std::numeric_limits::min(); + S max_pen_depth = -std::numeric_limits::max(); for (auto i = 0u; i < collision_result.numContacts(); ++i) { const auto& contact = collision_result.getContact(i);