Game Development Reference
In-Depth Information
Cos(θ) = adjacent/hypotenuse
Tan(θ) = opposite/adjacent
The best way to see how the sine, cosine, and tangent functions can be utilized is by tak-
ing a look at the following example:
We want to calculate the length of the opposite side, given the length of the adjacent side
and the angle. From here, we know that the tangent of an angle is equal to the opposite
side divided by the adjacent side. Rearranging the equation a little gives us the following:
o = aTan(θ)
So, all we have to do in order to get o is to pick up a calculator (to determine the tangent)
and plug in the numbers, as follows:
o = 6Tan(0.9)
= 7.56
Search WWH ::




Custom Search