Java Distance Calculate distanceToPoint(float x1, float y1, float x2, float y2)

Here you can find the source of distanceToPoint(float x1, float y1, float x2, float y2)

Description

distance To Point

License

Open Source License

Declaration

public static float distanceToPoint(float x1, float y1, float x2, float y2) 

Method Source Code

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

public class Main {
    public static float distanceToPoint(float x1, float y1, float x2, float y2) {
        return (float) Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
    }/*from  w  w w  .  jav  a2  s  .  c o m*/
}

Related

  1. distanceTo(double latitudeGiven, double longitudeGiven, double latitudeTaken, double longitudeTaken)
  2. distanceTo(final int x, final int y, final int thatx, final int thaty)
  3. distanceToAncestor(Class entity, Class ancestor)
  4. distanceToClass(Class theClass, Class theAncestor)
  5. distanceToInterface(Class theClass, Class theInterface)
  6. distanceToSegment(float ax, float ay, float bx, float by, float px, float py)
  7. distanceToSegmentSquared(float px, float py, float vx, float vy, float wx, float wy)
  8. distanceVincenty(final double lat1, final double lon1, final double lat2, final double lon2)
  9. distancia(int[] c1, int[] c2)