mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-28 16:16:27 +00:00
refactor(Core/Misc): atan2() to std::atan2() (#9793)
- prefer std functions over C functions
This commit is contained in:
@@ -2908,7 +2908,7 @@ Position WorldObject::GetFirstCollisionPosition(float startX, float startY, floa
|
||||
auto dx = destX - startX;
|
||||
auto dy = destY - startY;
|
||||
|
||||
auto ang = atan2(dy, dx);
|
||||
auto ang = std::atan2(dy, dx);
|
||||
ang = (ang >= 0) ? ang : 2 * M_PI + ang;
|
||||
Position pos = Position(startX, startY, startZ, ang);
|
||||
|
||||
@@ -2926,7 +2926,7 @@ Position WorldObject::GetFirstCollisionPosition(float destX, float destY, float
|
||||
auto dx = destX - pos.GetPositionX();
|
||||
auto dy = destY - pos.GetPositionY();
|
||||
|
||||
auto ang = atan2(dy, dx);
|
||||
auto ang = std::atan2(dy, dx);
|
||||
ang = (ang >= 0) ? ang : 2 * M_PI + ang;
|
||||
|
||||
MovePositionToFirstCollision(pos, distance, ang);
|
||||
|
||||
@@ -217,7 +217,7 @@ void MotionTransport::Update(uint32 diff)
|
||||
G3D::Vector3 pos, dir;
|
||||
_currentFrame->Spline->evaluate_percent(_currentFrame->Index, t, pos);
|
||||
_currentFrame->Spline->evaluate_derivative(_currentFrame->Index, t, dir);
|
||||
UpdatePosition(pos.x, pos.y, pos.z, NormalizeOrientation(atan2(dir.y, dir.x) + M_PI));
|
||||
UpdatePosition(pos.x, pos.y, pos.z, NormalizeOrientation(std::atan2(dir.y, dir.x) + M_PI));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user