MCPcopy Create free account
hub / github.com/PavelDoGreat/WebGL-Fluid-Simulation / correctDeltaX

Function correctDeltaX

script.js:1553–1557  ·  view source on GitHub ↗
(delta)

Source from the content-addressed store, hash-verified

1551}
1552
1553function correctDeltaX (delta) {
1554 let aspectRatio = canvas.width / canvas.height;
1555 if (aspectRatio < 1) delta *= aspectRatio;
1556 return delta;
1557}
1558
1559function correctDeltaY (delta) {
1560 let aspectRatio = canvas.width / canvas.height;

Callers 1

updatePointerMoveDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected