Returns the distance between the exterior of two circles, or between the exterior of a circle and point. If b overlaps or is enclosed by a, distance is 0.
b
a
import { Circles } from "https://unpkg.com/ixfx/dist/geometry.js" const circleA = { radius: 5, x: 5, y: 5 }const circleB = { radius: 10, x: 20, y: 20 }const distance = Circles.distanceCenter(circleA, circleB); Copy
import { Circles } from "https://unpkg.com/ixfx/dist/geometry.js" const circleA = { radius: 5, x: 5, y: 5 }const circleB = { radius: 10, x: 20, y: 20 }const distance = Circles.distanceCenter(circleA, circleB);
Returns the distance between the exterior of two circles, or between the exterior of a circle and point. If
b
overlaps or is enclosed bya
, distance is 0.