matty
0
Q:

distance between two points java

static double distance(int x1, int y1, int x2, int y2) 
{ 
    // Calculating distance 
    return Math.sqrt(Math.pow(x2 - x1, 2) +  
                Math.pow(y2 - y1, 2) * 1.0); 
} 
0

New to Communities?

Join the community