Gamalto

Fork me on GitHub

Namespace Math Overview

Math

Extensions to the Math native object.

Methods

fabs(n) number

static

Faster version of the original Math.abs() method which returns the absolute value of a number.

Parameters
Name Type Description
n number

A number.

Returns
  • The absolute value of the number.

fmax(x, y) number

static

Determines the largest number of the two parameters.

Parameters
Name Type Description
x number

Number to compare.

y number

Another number to compare.

Returns
  • The largest number.

fmin(x, y) number

static

Determines the smallest number of the two parameters.

Parameters
Name Type Description
x number

Number to compare.

y number

Another number to compare.

Returns
  • The smallest number.

sign(n) number

static

Gets the sign of a number.

Parameters
Name Type Description
n number

Number to test.

Returns
  • 0 if the value is zero, -1 if negative, +1 if positive or NaN if the value is not a number.

Documentation generated by JSDoc 3.3.2 on Sun Sep 13 2015 20:13:32 GMT+0200 (CEST)