Java tutorial
//package com.java2s; public class Main { private static double calcEuclideanDist(double aLat, double aLong, double bLat, double bLong) { // return Math.sqrt(Math.pow(aLat-bLat,2) + Math.pow(aLong-bLong, 2)); return (Math.pow(aLat - bLat, 2) + Math.pow(aLong - bLong, 2)); } }