new WKcMath() → {Object}
The class
WKcMath contains sone useful static methods
and constants.
- Source:
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 |
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_intervalNumber | Object | Array A single number, an object with two properties minandmaxwhose values are numbers, or an array containing several intervals,.- Source:
Returns:
A random number whithin the range of the closed interval defined byp_interval.- Type
- Number
-
<static> randomInt(p_interval) → {int}
-
Parameters:
Name Type Description p_intervalnumber | Object | Array A single number, an object with two properties minandmaxwhose values are numbers, or an array containing several intervals,.- Source:
Returns:
A random integer whithin the range of the closed interval defined byp_interval.- Type
- int
-
<static> randomVector2D(p_interval) → {$wk$.math.geo2d.WKtVector2D}
-
Parameters:
Name Type Description p_intervalNumber | $wk$.math.geo2d.WKtVector2D | Array | Object A single number or vector, an array containing several numbers or vectors, or an object with two properties minandmaxwhose values are numbers or vectors.- Source:
Returns:
A random vector whithin the range of the closed interval defined byp_interval. -
<static> signum(p_number) → {Number}
-
Parameters:
Name Type Description p_numberNumber - Source:
Returns:
The signum ofp_number.- Type
- Number