/ Published in: ActionScript 3
<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>
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function degrees(radians:Number):Number { return radians * 180/Math.PI; } function radians(degrees:Number):Number { return degrees * Math.PI / 180; }