public class Distance
extends java.lang.Object
| Constructor and Description |
|---|
Distance() |
| Modifier and Type | Method and Description |
|---|---|
static double |
between(double x1,
double y1,
double x2,
double y2)
Calculate the distance between two points (2D).
|
static double |
between(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
Calculate the distance between two points (3D).
|
static float |
between(float x1,
float y1,
float x2,
float y2)
Calculate the distance between two points (2D).
|
static float |
between(float x1,
float y1,
float z1,
float x2,
float y2,
float z2)
Calculate the distance between two points (3D).
|
static double |
squared(double x1,
double y1,
double x2,
double y2)
Calculate the squared distance between two points (2D).
|
static double |
squared(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
Calculate the squared distance between two points (3D).
|
static float |
squared(float x1,
float y1,
float x2,
float y2)
Calculate the squared distance between two points (2D).
|
static float |
squared(float x1,
float y1,
float z1,
float x2,
float y2,
float z2)
Calculate the squared distance between two points (3D).
|
public static float between(float x1,
float y1,
float x2,
float y2)
x1 - The x coordinate of the first pointy1 - The y coordinate of the first pointx2 - The x coordinate of the second pointy2 - The y coordinate of the second pointpublic static double between(double x1,
double y1,
double x2,
double y2)
x1 - The x coordinate of the first pointy1 - The y coordinate of the first pointx2 - The x coordinate of the second pointy2 - The y coordinate of the second pointpublic static float squared(float x1,
float y1,
float x2,
float y2)
x1 - The x coordinate of the first pointy1 - The y coordinate of the first pointx2 - The x coordinate of the second pointy2 - The y coordinate of the second pointpublic static double squared(double x1,
double y1,
double x2,
double y2)
x1 - The x coordinate of the first pointy1 - The y coordinate of the first pointx2 - The x coordinate of the second pointy2 - The y coordinate of the second pointpublic static float between(float x1,
float y1,
float z1,
float x2,
float y2,
float z2)
x1 - The x coordinate of the first pointy1 - The y coordinate of the first pointz1 - The z coordinate of the first pointx2 - The x coordinate of the second pointy2 - The y coordinate of the second pointz2 - The z coordinate of the second pointpublic static double between(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
x1 - The x coordinate of the first pointy1 - The y coordinate of the first pointz1 - The z coordinate of the first pointx2 - The x coordinate of the second pointy2 - The y coordinate of the second pointz2 - The z coordinate of the second pointpublic static float squared(float x1,
float y1,
float z1,
float x2,
float y2,
float z2)
x1 - The x coordinate of the first pointy1 - The y coordinate of the first pointz1 - The z coordinate of the first pointx2 - The x coordinate of the second pointy2 - The y coordinate of the second pointz2 - The z coordinate of the second pointpublic static double squared(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
x1 - The x coordinate of the first pointy1 - The y coordinate of the first pointz1 - The z coordinate of the first pointx2 - The x coordinate of the second pointy2 - The y coordinate of the second pointz2 - The z coordinate of the second point