refactor(Core/Misc): sin() to std::sin() (#9795)

This commit is contained in:
Kitzunu 2022-01-06 19:29:40 +01:00 committed by GitHub
parent 66e6d33116
commit cb7e355291
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 212 additions and 211 deletions

View file

@ -308,23 +308,23 @@ static Position const PredictPosition(Unit* target)
if (target->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FORWARD))
{
pos.m_positionX += cos(orientation) * speed;
pos.m_positionY += sin(orientation) * speed;
pos.m_positionY += std::sin(orientation) * speed;
}
else if (target->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_BACKWARD))
{
pos.m_positionX -= cos(orientation) * speed;
pos.m_positionY -= sin(orientation) * speed;
pos.m_positionY -= std::sin(orientation) * speed;
}
if (target->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_STRAFE_LEFT))
{
pos.m_positionX += cos(orientation + M_PI / 2.f) * speed;
pos.m_positionY += sin(orientation + M_PI / 2.f) * speed;
pos.m_positionY += std::sin(orientation + M_PI / 2.f) * speed;
}
else if (target->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_STRAFE_RIGHT))
{
pos.m_positionX += cos(orientation - M_PI / 2.f) * speed;
pos.m_positionY += sin(orientation - M_PI / 2.f) * speed;
pos.m_positionY += std::sin(orientation - M_PI / 2.f) * speed;
}
return pos;