refactor(Core/Misc): sqrt/log/exp() to std::sqrt/log/exp() (#9792)

This commit is contained in:
Kitzunu
2022-02-09 11:59:30 +01:00
committed by GitHub
parent 65a1fbfd35
commit cf65cd6baf
15 changed files with 24 additions and 24 deletions

View File

@@ -2088,7 +2088,7 @@ bool GameObject::IsInRange(float x, float y, float z, float radius) const
float dx = x - GetPositionX();
float dy = y - GetPositionY();
float dz = z - GetPositionZ();
float dist = sqrt(dx * dx + dy * dy);
float dist = std::sqrt(dx * dx + dy * dy);
//! Check if the distance between the 2 objects is 0, can happen if both objects are on the same position.
//! The code below this check wont crash if dist is 0 because 0/0 in float operations is valid, and returns infinite
if (G3D::fuzzyEq(dist, 0.0f))