fix(Core/Position): Normalize Position.GetRelativeAngle (#16825)
Normalize GetRelativeAngle Normalize angle returned by both Position.GetRelativeAngle functions.
This commit is contained in:
parent
ca95b4a129
commit
89ba87495e
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue