blockwise
    Preparing search index...

    Function calculateBlockCenter

    • Calculate the position of the center of a block.

      import type { Block } from "blockwise";
      import { calculateBlockCenter } from "blockwise";

      const block: Block = { x: 0, y: 0, h: 1, w: 1 };
      const center: Block = calculateBlockCenter(block);
      console.log(center); // { x: 0.5, y: 0.5, h: 0, w: 0 }

      Parameters

      Returns Block