Arithmetic Precedence

77 Views Asked by At

I stumbled upon an answer in another Stack Exchange site which is :

$x = cx + r \times \cos a$

$y = cy + r \times \sin a$

With the above example, a degree of 76 would be:

$x = 115 + 110 \times \cos 76$

$y = 115 + 110 \times \sin 76$

Which gives us 205.676, 177.272

I've been wondering why are $x = 205.676$ and $y = 177.272$ ?

Shouldn't those are $x = 141.611$ and $y = 221.732$ ?

1

There are 1 best solutions below

2
On BEST ANSWER

One of you is using sine and cosine functions designed for degrees and the other is using functions designed for radians.

If the angle $a= 76$ is being measured in degrees than $141.611$ and $221.732$ are correct results of the calculations. The same angle in radians is about $1.32645$.