See Section 25.10.8 for squares of lengths in three-dimensional geometry.
The distance2 command finds the square of the distance between two points.