Finding the Angle from a Given Cosine Value
Sun, Jan 22, 2012
One-minute read
Trigonometry usually goes the other way around: you start with an angle and read off its cosine. In this program we flip that, working back from a given cosine value (say cos 37) to the angle it belongs to.
As you can see above, we pulled in the studio.h and math.h libraries, the latter being what gives us the trig functions to work with…
To make sure it holds up, take a value we already know: cos 60 = 0.5. Running it through confirms the result, since cos(60*pi/180) = 0.5.
– Turkish Version –
Verilen cosinüs değerinin bulunması
Trigonometri genelde ters yönde işler: bir açıdan yola çıkıp cosinüsünü bulursunuz. Bu programda ise tam tersini yapıyoruz, verilen bir cos değerinden (örn. cos 37) yola çıkıp ait olduğu açıyı buluyoruz.
Yukarıda görüldüğü gibi studio.h ve math.h kütüphanelerini ekledik; trigonometri fonksiyonlarını bize sağlayan da math.h oluyor…
Doğruluğundan emin olmak için zaten bildiğimiz bir değeri alalım: cos 60 = 0.5. Çalıştırınca sonuç tutuyor, çünkü cos(60*pi/180) = 0.5.

