Here you can find the source of dist(int p1, int p2)
public static double dist(int p1, int p2)
//package com.java2s; // The MIT License (MIT) public class Main { public static double dist(int p1, int p2) { return Math.sqrt(p1 * p1 + p2 * p2); }/*from w w w . j av a 2s. co m*/ public static double dist(double p1, double p2) { return Math.sqrt(p1 * p1 + p2 * p2); } }