intersectsWithSphere method

bool intersectsWithSphere (Sphere other)

Return if this intersects with other.

Implementation

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

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