Tan () function returns wrong value
I'm having a problem with some code, but I can't find the error. I am trying to calculate the distance indicated in red in the sketch below.
My code returns value: -41.63
Correct value: 3.75
My code:
return round(6.5 * tan(30),2);
Based on: http://php.net/manual/en/function.tan.php
I thought it would be a simple task, but I hit the wall - I see no error. Hopefully some of you can point me in the right direction.
Thank,
Kenneth
+3
source to share