diff --git a/panda/src/collide/collisionSphere.cxx b/panda/src/collide/collisionSphere.cxx index f65bcca0f9..b54d1e7cc8 100644 --- a/panda/src/collide/collisionSphere.cxx +++ b/panda/src/collide/collisionSphere.cxx @@ -348,7 +348,8 @@ test_intersection_from_sphere(const CollisionEntry &entry) const { return NULL; } - actual_t = min(1.0f, max(0.0f, t1)); + // doubles, not floats, to satisfy min and max templates. + actual_t = min(1.0, max(0.0, t1)); contact_point = from_a + actual_t * (from_b - from_a); if (t1 < 0.0) { diff --git a/panda/src/collide/collisionTube.cxx b/panda/src/collide/collisionTube.cxx index e52c73ea07..fa4faefce2 100644 --- a/panda/src/collide/collisionTube.cxx +++ b/panda/src/collide/collisionTube.cxx @@ -198,7 +198,8 @@ test_intersection_from_sphere(const CollisionEntry &entry) const { return NULL; } - actual_t = min(1.0f, max(0.0f, t1)); + // doubles, not floats, to satisfy min and max templates. + actual_t = min(1.0, max(0.0, t1)); contact_point = from_a + actual_t * (from_b - from_a); if (collide_cat.is_debug()) {