diff --git a/src/thirdparty/recast/Shared/Source/SharedCommon.cpp b/src/thirdparty/recast/Shared/Source/SharedCommon.cpp index 8dddf9a2..196cd201 100644 --- a/src/thirdparty/recast/Shared/Source/SharedCommon.cpp +++ b/src/thirdparty/recast/Shared/Source/SharedCommon.cpp @@ -270,7 +270,7 @@ bool rdIntersectSegmentCylinder(const float* sp, const float* sq, const float* p // Vertical (z-axis) intersection test const float dz = sq[2]-sp[2]; - if (rdMathFabsf(dz) > RD_EPS) + if (dz != 0.0f) { float tCapMin = (cz-sp[2]) / dz; float tCapMax = (topZ-sp[2]) / dz; @@ -312,7 +312,7 @@ bool rdIntersectSegmentConvexHull(const float* sp, const float* sq, // Vertical (z-axis) intersection test const float dz = sq[2]-sp[2]; - if (rdMathFabsf(dz) > RD_EPS) + if (dz != 0.0f) { float tCapMin = (hmin-sp[2]) / dz; float tCapMax = (hmax-sp[2]) / dz;