I have two 3-D points.
Example:
float[] point1 = new float[3] {1.3919023, 6.12837912, 10.391283};
float[] point2 = new float[3] {48.3818, 38.38182, 318.381823};
Anyone an idea for an algorithm to calculate the distance in float between the points?
The Euclidean distance between two 3D points is:
And in N dimensions (untested and vulnerable to overflow):
Edit: I much prefer the
Zipsolution posted by dasblinkenlight below!