Skip to main content

overlaps_sphere3_sphere3

Function overlaps_sphere3_sphere3 

Source
pub fn overlaps_sphere3_sphere3<S: OrderedRing>(
    a: Sphere3<S>,
    b: Sphere3<S>,
) -> bool
Expand description

Overlap test of 3D spheres.

Spheres that are merely touching are not counted as intersecting:

let r = Positive::one();
let a = Sphere3 { center: [ 1.0, 0.0,  0.0].into(), radius: r };
let b = Sphere3 { center: [-1.0, 0.0,  0.0].into(), radius: r };
assert!(!overlaps_sphere3_sphere3 (a, b));