Java Distance Calculate distance(double x1, double y1, double z1, double x2, double y2, double z2)

Here you can find the source of distance(double x1, double y1, double z1, double x2, double y2, double z2)

Description

distance

License

LGPL

Declaration

public static double distance(double x1, double y1, double z1, double x2, double y2, double z2) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static double distance(double x1, double y1, double z1, double x2, double y2, double z2) {
        return Math.pow(Math.pow((x2 - x1), 2) + Math.pow(y2 - y1, 2) + Math.pow(z2 - z1, 2), 0.5);
    }/*from ww  w  . ja v a  2  s .  c  o  m*/
}

Related

  1. distance(double x0, double y0, double x1, double y1)
  2. distance(double x0, double y0, double z0, double x1, double y1, double z1)
  3. distance(double x1, double y1, double x2, double y2)
  4. distance(double x1, double y1, double x2, double y2)
  5. distance(double x1, double y1, double x2, double y2)
  6. distance(double xOrigin, double yOrigin, double xDestination, double yDestination)
  7. distance(double[] a, double[] b)
  8. distance(double[] a, double[] b)
  9. distance(double[] p1, double[] p2)