mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-05 03:53:48 +00:00
fix(Core/Position): Normalize Position.GetRelativeAngle (#16825)
Normalize GetRelativeAngle Normalize angle returned by both Position.GetRelativeAngle functions.
This commit is contained in:
@@ -196,10 +196,10 @@ struct Position
|
||||
|
||||
float GetRelativeAngle(const Position* pos) const
|
||||
{
|
||||
return GetAngle(pos) - m_orientation;
|
||||
return NormalizeOrientation(GetAngle(pos) - m_orientation);
|
||||
}
|
||||
|
||||
[[nodiscard]] float GetRelativeAngle(float x, float y) const { return GetAngle(x, y) - m_orientation; }
|
||||
[[nodiscard]] float GetRelativeAngle(float x, float y) const { return NormalizeOrientation(GetAngle(x, y) - m_orientation); }
|
||||
[[nodiscard]] float ToAbsoluteAngle(float relAngle) const { return NormalizeOrientation(relAngle + m_orientation); }
|
||||
|
||||
void GetSinCos(float x, float y, float& vsin, float& vcos) const;
|
||||
|
||||
Reference in New Issue
Block a user