Cos

From Eternity Wiki
Revision as of 14:56, 1 November 2021 by Printz (talk | contribs) (Created page with "{{ACSFunction|description=Computes the cosine function. |usage=fixed cos(fixed angle) |parameters=*''angle'': the fixed point angle (0 means east, 0.25 or 16384 means north, 0...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description[edit]

This is an ACS built-in function.

Computes the cosine function.

Usage[edit]

fixed cos(fixed angle)

Parameters[edit]

  • angle: the fixed point angle (0 means east, 0.25 or 16384 means north, 0.5 or 32768 west, 0.75 or 49152 south)

Return value[edit]

Examples[edit]

No examples given.

Notes[edit]

This uses Doom's classic (but perfectly deterministic) approximate trigonometrics, so there will be slight errors noticeable when pointing at orthogonal angles.

This function's identification in zspecial.acs is: ACS internal.

See also[edit]