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

@@ -116,7 +116,7 @@ public:
float dist(float xa, float ya, float xb, float yb) // auxiliary method for distance
{
return sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb));
return std::sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb));
}
void Reset() override

View File

@@ -246,7 +246,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
if (!victim || !victim->IsInWorld())
return;
float allowedDist = sqrt(MELEE_RANGE * MELEE_RANGE + 6.0f * 6.0f);
float allowedDist = std::sqrt(MELEE_RANGE * MELEE_RANGE + 6.0f * 6.0f);
if (!me->IsWithinMeleeRange(victim, allowedDist))
return;