Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
ActionScript has trig functions for calculating the various triangle relationships: sine, cosine, tangent, arcsine, arccosine, and arctangent. Here, I'll define these and the ActionScript functions for accessing them. Then I'll get to some real-life uses for these functions.
Here is your first bit of real-life trigonometry. The sine of an angle is the ratio of the angle's opposite leg to the hypotenuse. (When referring to sine, we are always referring to the sine of an angle.) In ActionScript, you can use the function Math.sin(angle).