abs(val)

Calculates the absolute value (magnitude) of a number. The absolute value of a number is always positive.

Type: function

Parameter(s):

  • val {Number}:

    A number.

Returns:

  • {Number}:

    The absolute value of that number.