Commits

Ahmed Youssef committed 8640ec5

atan2 fix <getQibla>

Comments (0)

Files changed (1)

JPrayertimes/src/net/pf/jprayertimes/Prayertimes.java

 
         double numerator = sin(k_lon - lon_r);
         double denominator = (cos(lat_r) * tan(k_lat)) - (sin(lat_r) * cos(k_lon - lon_r));
-        double q = toDegrees(atan(numerator / denominator));
+        double q = toDegrees(atan2(numerator, denominator));
+
 
         return q;