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.
- function degrees(radians:Number):Number
- return radians * 180/Math.PI;
- function radians(degrees:Number):Number
- return degrees * Math.PI / 180;
You need to login to post a comment.