Return to Snippet

Revision: 39132
at January 13, 2011 23:28 by Activetuts


Initial Code
function degrees(radians:Number):Number
{
    return radians * 180/Math.PI;
}

function radians(degrees:Number):Number
{
    return degrees * Math.PI / 180;
}

Initial URL
http://enva.to/e4ig6z

Initial Description
<p>When dealing with equations involving angles you will often be dealing in radians and not degrees. Display objects in Flash use degrees when dealing with their rotation property so we need a way to convert between the two. These helper function are useful for accomplishing just that; one for converting radians to degrees and the other degrees to radians.</p>

Initial Title
Converting Between Radians and Degrees

Initial Tags


Initial Language
ActionScript 3