ixfx
    Preparing search index...

    Function distanceFromCenter

    • Return the distance of pt to the center of rect.

      import { Rects } from "https://unpkg.com/ixfx/dist/geometry.js";
      const rect = { width: 100, height: 100, x: 0, y: 0 };
      Rects.distanceFromCenter(rect, { x: 20, y: 20 });

      Returns number