From cff151687d706d80d5d0a47caa29fa681f3f426f Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 23 Aug 2024 14:15:26 +0200 Subject: [PATCH] Recast: fix typo causing bug in rdClassifyPointInsideBounds Needs the square root for normalization. --- src/thirdparty/recast/Shared/Source/SharedCommon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thirdparty/recast/Shared/Source/SharedCommon.cpp b/src/thirdparty/recast/Shared/Source/SharedCommon.cpp index 98e81dfa..15c87999 100644 --- a/src/thirdparty/recast/Shared/Source/SharedCommon.cpp +++ b/src/thirdparty/recast/Shared/Source/SharedCommon.cpp @@ -490,7 +490,7 @@ unsigned char rdClassifyPointInsideBounds(const float* pt, const float* bmin, co boxSize[0] = bmax[0]-bmin[0]; boxSize[1] = bmax[1]-bmin[1]; - const float len = rdSqr(dir[0]*dir[0] + dir[1]*dir[1]); + const float len = rdMathSqrtf(dir[0]*dir[0] + dir[1]*dir[1]); if (len > RD_EPS) { dir[0] /= len;