Android Distance Calculate dist(PointF p1, PointF p2)

Here you can find the source of dist(PointF p1, PointF p2)

Description

dist

Declaration

public static float dist(PointF p1, PointF p2) 

Method Source Code

//package com.java2s;
import android.graphics.PointF;

public class Main {
    public static float dist(PointF p1, PointF p2) {
        float dist = (float) Math.sqrt(Math.pow(p2.x - p1.x, 2)
                + Math.pow(p2.y - p1.y, 2));
        return dist;
    }/*from  w  w w .  j  av  a 2  s. c  o m*/
}

Related

  1. getDistance(double lat1, double lon1, double lat2, double lon2)
  2. distance(int q1, int r1, int q2, int r2)
  3. distanceBetweenTwoLatLongs(Location oldLocation, Location newLocation)
  4. distanceInMeters(float distance)
  5. distanceBetweenTwoPoints(double lat1, double lng1, double lat2, double lng2)