Java Distance Calculate distance(int fx, int fy, int sx, int sy)

Here you can find the source of distance(int fx, int fy, int sx, int sy)

Description

distance

License

Open Source License

Declaration

public static double distance(int fx, int fy, int sx, int sy) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double distance(int fx, int fy, int sx, int sy) {
        final int dx = sx - fx;
        final int dy = sy - fy;
        return Math.sqrt(dx * dx + dy * dy);
    }/*from  www  .  ja  v a2 s . c om*/
}

Related

  1. distance(float x1, float y1, float x2, float y2)
  2. distance(float[] p1, float[] p2)
  3. distance(float[] values1, float[] values2)
  4. distance(int ax, int ay, int bx, int by)
  5. distance(int first, int second)
  6. distance(int one, int two)
  7. distance(int px, int py, int x1, int y1, int x2, int y2)
  8. distance(int q1, int r1, int q2, int r2)
  9. distance(int x, int y, int targetX, int targetY, int minDist, int[] outCoords)