@nbogie/p5.neill-utils
    Preparing search index...

    Function snapPositionTo

    • Snaps given position to the nearest increment on both axes, returning new position.

      Parameters

      • pos: SimpleXY

        position to quantise. Unchanged.

      • increment: number

      Returns SimpleXY

      new position object snapped on both x and y axes to nearest increment