Snap the given x,y to a point on the grid defined by gridX and gridY, using the given thresholds to calculate proximity to the grid.
export declare function snapToGrid(pos: PointXY, grid: Grid, thresholdX?: number, thresholdY?: number): PointXY;
|pos||PointXY||Position to transform|
|grid||Grid||Definition of the grid|
|thresholdX||number||Defines how close to a grid line in the x axis a value must be in order to be snapped to it.|
|thresholdY||number||Defines how close to a grid line in the y axis a value must be in order to be snapped to it.|
The point to which the position was snapped, given the constraints of the grid.