It just boggles the mind. Try floats or doubles.
On 9/5/2011 5:27 AM, Fred Niggle wrote:
Many thanks for your reply, but as this is not an iOS list........ I've been having trouble deciding on what type of variable should be used when converting the formulea from javascript to android java, and I could really use some pointers. On 4 September 2011 02:08, lbendlin<[email protected]> wrote:in iOS the manual function is faster than the built-in one, but on Android the difference is negligible. here's the Objective-C version //spherical distance in meters - (CGFloat) sphericalDistanceFromLat1:(CGFloat)lat1 Lon1:(CGFloat)lon1 toLat2:(CGFloat)lat2 Lon2:(CGFloat)lon2 { return acos(sin(lat1 * 0.0174533) * sin(lat2 * 0.0174533) + cos(lat1 * 0.0174533) * cos(lat2 * 0.0174533) * cos((lon2-lon1) * 0.0174533)) * 6371000; } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

