ixfx
    Preparing search index...

    Function center

    • Returns the center of a circle

      If the circle has an x,y, that is the center. If not, radius is used as the x and y.

      import { Circles } from "https://unpkg.com/ixfx/dist/geometry.js" 
      const circle = { radius: 5, x: 10, y: 10};

      // Yields: { x: 5, y: 10 }
      Circles.center(circle);

      It's a trivial function, but can make for more understandable code

      Returns Readonly<{ x: number; y: number }>

      Center of circle