mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
refactor(Core/Misc): fabs() to std::fabs() (#9790)
- prefer std functions over C functions
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user