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

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

Description

sqr Distance

License

Apache License

Declaration

public static float sqrDistance(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 sqrDistance(float x1, float y1, float x2, float y2) {
        float dx = x1 - x2;
        float dy = y1 - y2;
        return dx * dx + dy * dy;
    }//from www. j av a2s.co  m
}

Related

  1. distToRectNode(double[] point, double[] nodeCenter, double nodeRadius)
  2. distUndermod(double a, double b, double mod)
  3. distVector(double[] vector1, double[] vector2)
  4. distVincentyRAD(double lat1, double lon1, double lat2, double lon2)
  5. getDistance(double lat1, double lng1, double lat2, double lng2)
  6. squaredDistance(float[] p, int a, int b)
  7. squaredEuclideanDistance(double[] x, double[] y)
  8. squareDist31TileMetric(int x1, int y1, int x2, int y2)
  9. squareDistance(double pointAX, double pointAY, double pointBX, double pointBY)