Class Haversine

java.lang.Object
com.ehealthsystem.map.Haversine

public class Haversine extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    distance(com.google.maps.model.LatLng loc1, com.google.maps.model.LatLng loc2)
    Calculate the distance between to location points given as coordinates using the Haversine formula
    static void
    main(String[] args)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Haversine

      public Haversine()
  • Method Details

    • distance

      public static double distance(com.google.maps.model.LatLng loc1, com.google.maps.model.LatLng loc2)
      Calculate the distance between to location points given as coordinates using the Haversine formula
      Parameters:
      loc1 - location point 1/A
      loc2 - location point 2/B
      Returns:
      distance in kilometers
    • main

      public static void main(String[] args)