Hey all, what is the Actionscript 3 equivalent of PHP's deg2rad function?
+1
A:
Googling "ActionScript deg2rad" came up with this:
function deg2rad(degree) {
return degree * (Math.PI / 180);
}
Jordan
2010-03-29 23:27:51
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
2010-03-29 23:30:15