Does such function exist? I created my own but would like to use an official one:
private function opposite(number:Number):Number
{
if (number < 0)
{
number = Math.abs(number);
}
else
{
number = -(number);
}
return number;
}
So, -5 becomes 5 and 3 becomes -3.
Edit: Forgive me for being stupid. I'm human. :)