Java Distance Calculate distanceBetween(double x1, double y1, double x2, double y2)

Here you can find the source of distanceBetween(double x1, double y1, double x2, double y2)

Description

distance Between

License

Open Source License

Declaration

public static double distanceBetween(double x1, double y1, double x2,
            double y2) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double distanceBetween(double x1, double y1, double x2,
            double y2) {
        return Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
    }/*from  w  w w .  ja  va  2 s  .  co  m*/
}

Related

  1. distanceAbs(final int a, final int b)
  2. distanceBase(double[] coord1, double[] coord2, int order)
  3. distanceBetween(double latitude1, double longitude1, double latitude2, double longitude2)
  4. distanceBetween(double lon, double lat, double otherLon, double otherLat)
  5. distanceBetween(double startLatitude, double startLongitude, double endLatitude, double endLongitude)
  6. distanceBetween(double x1, double y1, double x2, double y2)
  7. distanceBetween(double xpos1, double ypos1, double xpos2, double ypos2)
  8. distanceBetween2GeoPositionsInMeters(double latA, double lngA, double latB, double lngB)
  9. distanceBetween2Points(float p1[], float p2[])