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

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

Description

calc Distance

License

Open Source License

Declaration

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

Method Source Code

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

public class Main {
    public static int calcDistance(int x1, int y1, int x2, int y2) {
        return (int) Math.ceil(Math.sqrt((x2 - x1) ^ 2 + (y2 - y1) ^ 2));
    }//from  w  w  w  .  java  2 s.  co  m
}

Related

  1. CalcDistance(double lat1, double lon1, double lat2, double lon2)
  2. calcDistance(double lon1, double lat1, double lon2, double lat2)
  3. calcDistance(final int coordinate1, final int coordinate2)
  4. calcDistance(int ax, int ay, int bx, int by)
  5. calcDistanceBetweenCoords(double startLat, double startLon, double endLat, double endLon)
  6. calcDistanceHubery(double lat1, double lng1, double lat2, double lng2, int type)
  7. calcDistanceIfAccel(double startVelocity, double accel, double targetVelocity, double duration)
  8. calcDistanceToStop(double startingVelocity, double maxDeceleration)