The MathFn class contains math functions not available from the Math class.
The MathFn class should not be instantiated !
public static function limit(val:*, min:*, max:*):*
Limit a value between a min and max value.
Parameters
| val:* — Value to limit.
|
|
| min:* — Minimum allowed value.
|
|
| max:* — Maximum allowed value.
|
Returns
| * — The result of the limit function.
|
Example
import km.math.*;
var v:int = 5;
v = MathFn.limit(v, 1, 4);
public static function sgn(val:*):int
Returns the sign of a value (-1, 0 or 1).
Parameters
Returns
Last update : 11/27/2009