intersectsWithSphere method Null safety
- 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);
}