Java Distance Calculate dist(int x1, int y1, int x2, int y2)

Here you can find the source of dist(int x1, int y1, int x2, int y2)

Description

dist

License

Apache License

Declaration

public static int dist(int x1, int y1, int x2, int y2) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int dist(int x1, int y1, int x2, int y2) {
        return (int) Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));
    }/* ww w .  ja v a  2 s .  c om*/
}

Related

  1. dist(float x1, float y1, float x2, float y2)
  2. dist(float x1, float y1, float x2, float y2, float xp, float yp)
  3. dist(float x1, float y1, float z1, float x2, float y2, float z2)
  4. dist(int i, int j, int width)
  5. dist(int p1, int p2)
  6. dist14(double d12, double d23, double d34, double theta123, double theta234, double phi)
  7. dist2Degrees(double dist, double radius)
  8. dist2Radians(double dist, double radius)
  9. distAlongRaySquared(double px, double py, double qx, double qy, double rx, double ry)