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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.