MCPcopy Index your code
hub / github.com/NikLever/ThreeJS-PathEditor / snapToGrid

Method snapToGrid

graph.js:332–336  ·  view source on GitHub ↗
( pt )

Source from the content-addressed store, hash-verified

330 }
331
332 snapToGrid( pt ){
333 pt.x = Math.round(pt.x * 10) / 10;
334 pt.y = Math.round(pt.y * 10) / 10;
335 //return { x, y };
336 }
337
338 convertScreenToPath( x, y ){
339 const xOrg = this.canvas.width * this.config.yAxis;

Callers 2

constructorMethod · 0.80
addNodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected