Cos

From Eternity Wiki
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]