MCPcopy
hub / github.com/clientIO/joint / snapToGrid

Function snapToGrid

packages/joint-core/src/g/geometry.helpers.mjs:24–27  ·  view source on GitHub ↗
(value, gridSize)

Source from the content-addressed store, hash-verified

22};
23
24export const snapToGrid = function(value, gridSize) {
25
26 return gridSize * round(value / gridSize);
27};
28
29export const toDeg = function(rad) {
30

Callers 1

point.mjsFile · 0.90

Calls 1

roundFunction · 0.85

Tested by

no test coverage detected