Java Euclidean Distance EuclideanDistance(double xSource, double ySource, double xTarget, double yTarget)

Here you can find the source of EuclideanDistance(double xSource, double ySource, double xTarget, double yTarget)

Description

Euclidean Distance

License

Open Source License

Declaration

private static final double EuclideanDistance(double xSource, double ySource, double xTarget, double yTarget) 

Method Source Code

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

public class Main {
    private static final double EuclideanDistance(double xSource, double ySource, double xTarget, double yTarget) {
        double distance = Math.sqrt(Math.pow(xTarget - xSource, 2) + Math.pow(yTarget - ySource, 2));
        return distance;
    }/*from  ww  w  .  ja v a2s .c om*/
}

Related

  1. euclideanDist(final double[] vec1, final double[] vec2, int n)
  2. euclideanDist(float[] v1, float[] v2)
  3. euclideanDistance(double instance1[], double instance2[])
  4. euclideanDistance(double x1, double y1, double x2, double y2)
  5. euclideanDistance(double x1, double y1, double x2, double y2)
  6. euclideanDistance(double[] a, double[] b)
  7. euclideanDistance(double[] coord1, double[] coord2)
  8. euclideanDistance(double[] data, double[] pattern)
  9. euclideanDistance(double[] l1, double[] l2, boolean weighted)