Javascript Math

From Yate Documentation
Revision as of 12:01, 2 March 2016 by Marian (Talk | contribs)

Jump to: navigation, search

Math global functions.

Static methods

  • abs(value)

Return the absolute value of an integer.
Return 0 if 'value' is not an integer.

  • max(value1 [, value2 [, ...]])

Return the largest value in parameters.
Return NaN if the parameters list contains only non integer values.
Non integer values are ignored.

  • min(value1 [, value2 [, ...]])

Return the smallest value in parameters.
Return the largest integer value if the parameters list contains only non integer values.
Non integer values are ignored.

  • random([min [, max]])

Return a random integer value in interval [min .. max).
min defaults to 0, max defaults to largest integer value.
Function call fails if min < 0 or max < 0 or min >= max.

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers