distanceSqr method

double distanceSqr(
  1. V3 o
)

Squared Euclidean distance between this vector and o.

Prefer over distance when only relative comparison is needed.

Implementation

double distanceSqr(V3 o) => (x - o.x)*(x - o.x) + (y - o.y)*(y - o.y) + (z - o.z)*(z - o.z);