Skip to main content

overlaps_sphere2_sphere2

Function overlaps_sphere2_sphere2 

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

Overlap test of 2D spheres.

Spheres that are merely touching are not counted as intersecting:

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