ixfx
    Preparing search index...

    Function centerOrigin

    • Perform basic point translation using a rectangle where its center is the origin.

      Thus the relative coordinate { x: 0, y: 0} corresponds to the absolute middle of the rectangle.

      The relative coordinate { x: -1, y: -1 } corresponds to the rectangle's {x,y} properties, and so on.

      Parameters

      Returns {
          absoluteToRelative: (point: Point) => Point;
          relativeToAbsolute: (point: Point) => Point;
      }