Ang (wall)

From EDukeWiki
Revision as of 00:22, 7 January 2024 by Doom64hunter (talk | contribs) (New struct member added with commit 621fb47a)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is a read-only pseudo struct member.

It does not actually exist as a true member of the wall struct, but is instead calculated on-the-fly when accessed, based on the x/y coordinates of the two wall points.

The calculation is done through the following formula:

(getangle(wall[wall[wallNum].point2].x - wall[wallNum].x, wall[wall[wallNum].point2].y - wall[wallNum].y) + 512) & 2047