Trigonometric Identities

Now that we've defined the six trigonometric functions, several trig identities (or rules) allow you to algebraically manipulate equations that have the trig functions embedded in them. You never know when these identities might prove useful. Remember that when you're programming, every operation takes additional processing time, so always try to reduce formulas to their simplest terms. Of course, this might involve one or more of these identities.

The first identity is the unit circle, which is the circle centered at the origin with a radius of 1. The equation for the unit circle is x2+y2=1. For any point on the unit circle, you can create a right triangle with one angle in standard position, as shown in Figure 3.15 ...

Get Beginning Math and Physics for Game Programmers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.