Recast: remove unnecessary abs with epsilon check

Introduced in 2745f8b27c43b9c78c106e3dc278a2d1752fd7a5 but this is not needed.
This commit is contained in:
Kawe Mazidjatari 2024-11-02 20:57:26 +01:00
parent 7ee884b39c
commit 1e2c445cf3

View File

@ -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;