use fabsf() rather than fabs()

This commit is contained in:
Andrew Meadows 2017-03-06 15:50:32 -08:00
parent 10b3e7fc67
commit d749c0c8be

View file

@ -267,8 +267,8 @@ const btCollisionShape* ShapeFactory::createShapeFromInfo(const ShapeInfo& info)
const float MIN_RADIUS = 0.001f;
const float MIN_RELATIVE_SPHERICAL_ERROR = 0.001f;
if (radius > MIN_RADIUS
&& fabs(radius - halfExtents.y) / radius < MIN_RELATIVE_SPHERICAL_ERROR
&& fabs(radius - halfExtents.z) / radius < MIN_RELATIVE_SPHERICAL_ERROR) {
&& fabsf(radius - halfExtents.y) / radius < MIN_RELATIVE_SPHERICAL_ERROR
&& fabsf(radius - halfExtents.z) / radius < MIN_RELATIVE_SPHERICAL_ERROR) {
// close enough to true sphere
shape = new btSphereShape(radius);
} else {