refactor(Core/Misc): atan2() to std::atan2() (#9793)

- prefer std functions over C functions
This commit is contained in:
Kitzunu 2022-01-03 17:24:06 +01:00 committed by GitHub
parent 2f7ccbe92f
commit 317e793b12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View file

@ -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);