Java Distance Calculate distBetween(float x1, float y1, float x2, float y2)

Here you can find the source of distBetween(float x1, float y1, float x2, float y2)

Description

dist Between

License

Open Source License

Declaration

public static double distBetween(float x1, float y1, float x2, float y2) 

Method Source Code

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

public class Main {
    public static double distBetween(float x1, float y1, float x2, float y2) {
        float dx = x1 - x2;
        float dy = y1 - y2;
        double diff = Math.sqrt((dx * dx) + (dy * dy));
        return diff;
    }/*from   ww w  . j av  a  2s. c  o m*/
}

Related

  1. distanceToSegment(float ax, float ay, float bx, float by, float px, float py)
  2. distanceToSegmentSquared(float px, float py, float vx, float vy, float wx, float wy)
  3. distanceVincenty(final double lat1, final double lon1, final double lat2, final double lon2)
  4. distancia(int[] c1, int[] c2)
  5. distAngle(double[] pos1, double[] pos2)
  6. distBetweenSq(double x1, double y1, double z1, double x2, double y2, double z2)
  7. distence(double lat1, double lon1, double lat2, double lon2, double radius)
  8. distEucl(float[] x1, float[] x2)
  9. distExtraBits(int dist)