refactor(Core/Misc): fabs() to std::fabs() (#9790)

- prefer std functions over C functions
This commit is contained in:
Kitzunu
2022-01-01 00:41:00 +01:00
committed by GitHub
parent ac99eb48e1
commit 913e65f97f
26 changed files with 43 additions and 43 deletions

View File

@@ -850,7 +850,7 @@ public:
if( me->GetUInt32Value(UNIT_NPC_EMOTESTATE) != EMOTE_STATE_WORK )
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_WORK);
if (fabs(me->GetOrientation() - me->GetAngle(c)) > M_PI / 4)
if (std::fabs(me->GetOrientation() - me->GetAngle(c)) > M_PI / 4)
me->SetFacingToObject(c);
c->AI()->SetData(2, 0);

View File

@@ -2361,7 +2361,7 @@ public:
}
Unit* _target = ObjectAccessor::GetUnit(*owner, _targetGUID);
if (!_target || !_target->IsAlive() || fabs(owner->GetPositionZ() - _target->GetPositionZ()) > 10.0f) // Target or owner underground
if (!_target || !_target->IsAlive() || std::fabs(owner->GetPositionZ() - _target->GetPositionZ()) > 10.0f) // Target or owner underground
{
SetDuration(0);
return;