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 <lutz@bendlin.us> 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 android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment