mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
refactor(Core/Misc): sqrt/log/exp() to std::sqrt/log/exp() (#9792)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user