Jaxer.Util.Math : Object
Return to: Jaxer Framework index

Namespace used to hold functions and other objects that extend JavaScript's math capabilities

Platform Support

Jaxer Server Framework Jaxer Client Framework
1.0 no

Functions

Method Action Jaxer Server Framework Jaxer Client Framework
static forceInteger(Object num, Object defaultNum) : void
Forces num into a finite integer. If it's a string, it first attempts to parse it to an integer. If it's a number, it takes its integer part by applying Math.floor() to it. If it's anything else, o NaN (not a number), it uses the defaultNum or 0.
Show Details 1.0 no

Parameters
Object num The object to turn into an integer
Object defaultNum The integer to use as a default (which will itself be forced to be 0 if not an integer)

static isInteger(Number num) : Boolean
Determine whether the specified value is an integer value
Show Details 1.0 no

Parameters
Number num The number to test

Returns
Boolean Returns true if the number is an integer value

aptana_docs