distanceToSquared method

double distanceToSquared(
  1. Vector3 other
)

Distance squared to other.

Implementation

double distanceToSquared(Vector3 other) {
  final dx = x - other.x;
  final dy = y - other.y;
  final dz = z - other.z;
  return dx * dx + dy * dy + dz * dz;
}