Packageefnx.general
Classpublic class Maths

Holds static mathematical functions that I use frequently.



Public Methods
 MethodDefined by
  
Maths
  
wrapIndex(val:int, w:int):int
[static] Maps a given int val between 0 and w.
Maths
Constructor detail
Maths()constructor
public function Maths()

Method detail
wrapIndex()method
public static function wrapIndex(val:int, w:int):int

Maps a given int val between 0 and w.

Parameters
val:int
 
w:int

Returns
int

Example
The following code wraps 13 within 3:
 wrapIndex(13, 3);  
Output: 1