Jump to content

Help needed regarding inverse trigonometric functions in PHP (asin, acos etc)


jawaidpk

Recommended Posts

Hi Friends,

 

well I got a problem while using  inverse trigonometric functions like atan, asin etc. in fact the formula which I am using assumed all the calculations would be done in degrees while PHP assumes the input to be provided to the trigonometric functions is Radians. I guess most of you would be thinking about to suggest me to use deg2rad() function, but I think its not the solution.

 

for example

 

in degrees

 

atan(0.4423) = 23.8598

 

but in PHP

 

atan(deg2rad(0.4423)) = 0.0077

 

I need 23.8598 as my answer as I have to use it in the upcoming calculations. if any body can tell me from where I could get those trigonometric functions in PHP which accepts degree as argument rather than radians then it would solve my overall problems. Otherwise it would also be acceptable if anybody can tell me how can I get the same result by using existing atan() and deg2rad or rad2deg functions.

 

 

Thanks in advance

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.