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

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

Description

dist Sqr

License

Open Source License

Declaration

public static double distSqr2(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 distSqr2(double x1, double y1, double x2, double y2) {
        x1 -= x2;//from   w w w  . ja  v a2 s .c o  m
        y1 -= y2;
        return x1 * x1 + y1 * y1;
    }
}

Related

  1. distribution(int[] values)
  2. distsimFeaturesException()
  3. distSphericalEarth(double lat1, double lon1, double lat2, double lon2)
  4. distSq(double x1, double y1, double x2, double y2)
  5. distSq(double x1, double y1, double z1, double x2, double y2, double z2)
  6. distSquared(double ax, double ay, double bx, double by)
  7. distSquared(float x0, float y0, float x1, float y1)
  8. distSquaredCartesian(double[] vec1, double[] vec2)
  9. distSquareVec3(final float[] v1, final float[] v2)