distanceToSquared method

num distanceToSquared(
  1. Vector3 v
)

Implementation

num distanceToSquared(Vector3 v) {
  final dx = x - v.x, dy = y - v.y, dz = z - v.z;
  final distance = dx * dx + dy * dy + dz * dz;
  return distance;
}