Squared 3D Euclidean distance between two points — use with a squared
threshold (getDistanceSquared(a, b) < r * r) to avoid a sqrt call when
only a threshold comparison is needed, not the actual distance value.
Parameters
p1: Float32Array
The position of the first point.
p2: Float32Array
The position of the second point.
Returns number
The squared Euclidean distance between the two points.
Squared 3D Euclidean distance between two points — use with a squared threshold (
getDistanceSquared(a, b) < r * r) to avoid a sqrt call when only a threshold comparison is needed, not the actual distance value.