Java Distance Calculate Distance(int X1, int X2, int Y1, int Y2)

Here you can find the source of Distance(int X1, int X2, int Y1, int Y2)

Description

Distance

License

Creative Commons License

Declaration

public static double Distance(int X1, int X2, int Y1, int Y2) 

Method Source Code

//package com.java2s;
//License from project: Creative Commons License 

public class Main {
    public static double Distance(int X1, int X2, int Y1, int Y2) {
        return Math.sqrt(Exp2(X1 - X2) + Exp2(Y1 - Y2));
    }//  w w  w .jav a 2  s  . c  o m

    public static int Exp2(int a) {
        return (a * a);
    }
}

Related

  1. distance(int fx, int fy, int sx, int sy)
  2. distance(int one, int two)
  3. distance(int px, int py, int x1, int y1, int x2, int y2)
  4. distance(int q1, int r1, int q2, int r2)
  5. distance(int x, int y, int targetX, int targetY, int minDist, int[] outCoords)
  6. distance(int x1, int y1, int x2, int y2)
  7. distance(int x1, int y1, int x2, int y2)
  8. distance(int x1, int y1, int x2, int y2)
  9. distance(int xa, int ya, int xb, int yb)