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

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

Description

distance Sq

License

Apache License

Declaration

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

Method Source Code

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

public class Main {
    public static double distance3Sq(double x1, double y1, double z1, double x2, double y2, double z2) {
        return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1) + (z2 - z1) * (z2 - z1);
    }/*from   w  w  w. j av  a 2s  .c  o  m*/
}

Related

  1. distance2(int x1, int y1, int x2, int y2)
  2. distance2d(double x1, double y1, double x2, double y2)
  3. distance2D(double x1, double z1, double x2, double z2)
  4. distance2points3D(double[] p1, double[] p2)
  5. distance3d(double x1, double y1, double z1, double x2, double y2, double z2)
  6. distance_Sphere(double rlon1, double rlat1, double rlon2, double rlat2)
  7. distance_to_endpoint(int x1, int y1, int x2, int y2, int x, int y)
  8. distance_to_endpoint(int x1, int y1, int x2, int y2, int x, int y)
  9. distance_to_line(double x1, double y1, double x2, double y2, double x3, double y3)