Search code examples
phpactionscript-3degreesradians

AS3 equivalent of PHP's deg2rad


Hey all, what is the Actionscript 3 equivalent of PHP's deg2rad function?


Solution

  • Googling "ActionScript deg2rad" came up with this:

    function deg2rad(degree) {
         return degree * (Math.PI / 180);
    }