intersectsWithSphere method

bool intersectsWithSphere(
  1. Sphere other
)

Return if this intersects with other.

Implementation

bool intersectsWithSphere(Sphere other) {
  final radiusSum = radius + other.radius;

  return other.center.distanceToSquared(center) <= (radiusSum * radiusSum);
}