Here you can find the source of euclideanDistanceSq2D(float x1, float y1, float x2, float y2)
public static float euclideanDistanceSq2D(float x1, float y1, float x2, float y2)
//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*/ }