I have a latitude and longitude in degrees and I want to convert these into radians. How can I do that?
P.S. I am using sphinx search engine and it requires values in radians
Just the same way you convert degrees to radians in real life:
radians = degrees * Math::PI / 180
There are 360 degrees and 2 pi radians in a circle. So to convert degrees to radians, divide by 360 and multiply by 2 * pi (approx. 6.28).
Or equivalently, divide by 180 and multiply by pi.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With