Hey all, what is the Actionscript 3 equivalent of PHP's deg2rad function?
Asked
Active
Viewed 1,170 times
1 Answers
1
Googling "ActionScript deg2rad" came up with this:
function deg2rad(degree) {
return degree * (Math.PI / 180);
}

Jordan Running
- 102,619
- 17
- 182
- 182
-
This is correct, but don't put this in a function in production code. Odds are you'll be calling this many times a frame, so just inline it where appropriate to save costs. – Cory Petosky Mar 29 '10 at 23:30