Class: WKcMath

WKcMath

new WKcMath() → {Object}

The class WKcMath contains sone useful static methods and constants.
Properties:
Name Type Description
EPSILON Number Two Numbers are supposed to be equal, if their absolute difference is less than or equal to WKcMath.EPSILON.
PI Number
PI_2 Number 2*WKcMath.PI
Source:
Returns:
A new WKcMath object, which, however is not needed (as there are only static members).
Type
Object

Methods

<static> random(p_interval) → {Number}

Parameters:
Name Type Description
p_interval Number | Object | Array A single number, an object with two properties min and max whose values are numbers, or an array containing several intervals,.
Source:
Returns:
A random number whithin the range of the closed interval defined by p_interval.
Type
Number

<static> randomInt(p_interval) → {int}

Parameters:
Name Type Description
p_interval number | Object | Array A single number, an object with two properties min and max whose values are numbers, or an array containing several intervals,.
Source:
Returns:
A random integer whithin the range of the closed interval defined by p_interval.
Type
int

<static> randomVector2D(p_interval) → {$wk$.math.geo2d.WKtVector2D}

Parameters:
Name Type Description
p_interval Number | $wk$.math.geo2d.WKtVector2D | Array | Object A single number or vector, an array containing several numbers or vectors, or an object with two properties min and max whose values are numbers or vectors.
Source:
Returns:
A random vector whithin the range of the closed interval defined by p_interval.
Type
$wk$.math.geo2d.WKtVector2D

<static> signum(p_number) → {Number}

Parameters:
Name Type Description
p_number Number
Source:
Returns:
The signum of p_number.
Type
Number
W. Kowarschick © 2013 (CC BY-NC-SA 3.0: http://creativecommons.org/licenses/by-nc-sa/3.0/)
Documentation generated by JSDoc 3.3.0-dev on Sat Oct 05 2013 15:14:39 GMT+0200 (MESZ) using the DocStrap template.