Java Distance Calculate distance(double x1, double y1, double x2, double y2)

Here you can find the source of distance(double x1, double y1, double x2, double y2)

Description

distance

License

Open Source License

Declaration

public static double distance(double x1, double y1, double x2, double y2) 

Method Source Code

//package com.java2s;

public class Main {
    public static double distance(double x1, double y1, double x2, double y2) {
        return Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
    }/*from  ww  w  . j  a  v a2  s  .c o  m*/
}

Related

  1. distance(double u, double v, double pu, double pv)
  2. distance(double w1, double h1, double w2, double h2, int type)
  3. distance(double x, double y, double xx, double yy)
  4. distance(double x0, double y0, double x1, double y1)
  5. distance(double x0, double y0, double z0, double x1, double y1, double z1)
  6. distance(double x1, double y1, double x2, double y2)
  7. distance(double x1, double y1, double x2, double y2)
  8. distance(double x1, double y1, double z1, double x2, double y2, double z2)
  9. distance(double xOrigin, double yOrigin, double xDestination, double yDestination)