本文へ移動

@eightkk/vue-weave / core / snapGraphPoint

Function: snapGraphPoint() ​

snapGraphPoint(point, grid): GraphPoint

Defined in: src/core/graphSnapping.ts:110

Rounds both coordinates of a point to the nearest multiple of grid. Throws a RangeError for a grid that is not a positive finite number or a point with non-finite coordinates. Returns a new point.

Parameters ​

point ​

GraphPoint

grid ​

number

Returns ​

GraphPoint

MIT ライセンスで公開しています。