Abs - Math

From the CreationKit Wiki
Revision as of 19:06, 15 November 2013 by imported>Ashes
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: Math Script

Calculates the absolute value of the number it is given.

Syntax[edit | edit source]

float Function abs(float afValue) native global

Parameters[edit | edit source]

  • afValue: The value to get the absolute value of.

Return Value[edit | edit source]

The absolute value of the passed-in value.

Examples[edit | edit source]

float x = math.abs(5.0) ; x == 5
float y = math.abs(-5.0) ; y == 5

See Also[edit | edit source]