import { Vector3 } from "./Vector3.js";
export class Sphere {
    center;
    radius;
    constructor(center = Vector3.zero.clone(), radius = 0) {
        this.center = center;
        this.radius = radius;
        if (!Number.isFinite(radius) || radius < 0)
            throw new RangeError("Sphere radius must be finite and non-negative.");
    }
    containsPoint(point) {
        return this.center.distanceTo(point) <= this.radius;
    }
    intersectsSphere(other) {
        return this.center.distanceTo(other.center) <= this.radius + other.radius;
    }
}
//# sourceMappingURL=Sphere.js.map