VectorLength

From Eternity Wiki
Revision as of 14:46, 3 May 2026 by Printz (talk | contribs) (Created page with "{{ACSFunction|description=Returns the length (absolute value) of a two-dimensional vector. |usage=''fixed'' '''VectorLength'''(''fixed'' ''x'', ''fixed'' ''y'') |parameters= *''x'', ''y'': vector components (typically distances along the X and Y axes) |return= The length of the vector. |notes=This returns the exact length of the line, without using coarse approximations like it happens elsewhere in the engine. |id=-50}}")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description[edit]

This is an ACS built-in function.

Returns the length (absolute value) of a two-dimensional vector.

Usage[edit]

fixed VectorLength(fixed x, fixed y)

Parameters[edit]

  • x, y: vector components (typically distances along the X and Y axes)

Return value[edit]

The length of the vector.

Examples[edit]

No examples given.

Notes[edit]

This returns the exact length of the line, without using coarse approximations like it happens elsewhere in the engine.

This function's identification in zspecial.acs is: -50.

See also[edit]