Java Euclidean Distance euclideanDistanceSq2D(float x1, float y1, float x2, float y2)

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

Description

euclidean Distance Sq D

License

Apache License

Declaration

public static float euclideanDistanceSq2D(float x1, float y1, float x2, float y2) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static float euclideanDistanceSq2D(float x1, float y1, float x2, float y2) {
        float dx = x1 - x2;
        float dy = y1 - y2;
        return dx * dx + dy * dy;
    }/*from   w ww .  j  av  a2  s.  c o m*/
}

Related

  1. euclideanDistance(double[] vector1, double[] vector2)
  2. euclideanDistance(float[] points, int p1, int p2, boolean isDisp, double width, double height)
  3. euclideanDistance(int i0, int j0, int i1, int j1)
  4. euclideanDistance(int startX, int startY, int startZ, int endX, int endY, int endZ)
  5. euclideanDistanceNorm(float[] x, float[] y)