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 FrameworkJaxer Client Framework
1.0no

Functions

MethodActionJaxer Server FrameworkJaxer 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 Details1.0no

Parameters
ObjectnumThe object to turn into an integer
ObjectdefaultNumThe 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 Details1.0no

Parameters
NumbernumThe number to test

Returns
BooleanReturns true if the number is an integer value

aptana_docs