Faster Math.abs() (7)
January 28th, 2009, under actionscript, Code snippets.
Quick post
This function returns the absolute value of a specified number. This is +/- 24x faster than the regular Math.abs().
public function abs( value:Number ):Number
{
return value < 0 ? -value : value;
}
{
return value < 0 ? -value : value;
}
Tagged with snippet.


















