From ZDoom Wiki
Jump to: navigation, search
Note: This feature is for ZScript only.

double absangle (double angle1, double angle2)


Used to find the absolute (non-negative) angular difference between two angles, because raw actor angles may not always be normalized. For example, the player's angle variable can return inconsistent results if the player has turned a complete circle.


  • angle1: The first angle to be compared.
  • angle2: The angle to be subtracted from the first.

Return Value

  • The difference between the two angles, normalized to between [0,180] (whether the original was positive or negative).

See Also