• Returns a function that divides a point:

    const f = divider(100, 200);
    f(50,100); // Yields: { x: 0.5, y: 0.5 }

    Input values can be Point, separate x,y and optional z values or an array:

    const f = divider({ x: 100, y: 100 });
    const f = divider( 100, 100 );
    const f = divider([ 100, 100 ]);

    Likewise the returned function an take these as inputs:

    f({ x: 100, y: 100});
    f( 100, 100 );
    f([ 100, 100 ]);

    Function throws if divisor has 0 for any coordinate (since we can't divide by 0)

    Parameters

    • a:
          | number
          | number[]
          | Point
          | Point3d

      Divisor point, array of points or x

    • Optionalb: number

      Divisor y value

    • Optionalc: number

      Divisor z value

    Returns ((aa:
        | number
        | number[]
        | Point
        | Point3d, bb?: number, cc?: number) => Point)

      • (aa, bb?, cc?): Point
      • Parameters

        • aa:
              | number
              | number[]
              | Point
              | Point3d
        • Optionalbb: number
        • Optionalcc: number

        Returns Point