Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

TRIGONOMETRY FOR ANIMATION > Trig functions

Trig functions

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.

Sine

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).


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial