MCPcopy Index your code
hub / github.com/PavelDoGreat/WebGL-Fluid-Simulation / wrap

Function wrap

script.js:1606–1610  ·  view source on GitHub ↗
(value, min, max)

Source from the content-addressed store, hash-verified

1604}
1605
1606function wrap (value, min, max) {
1607 let range = max - min;
1608 if (range == 0) return min;
1609 return (value - min) % range + min;
1610}
1611
1612function getResolution (resolution) {
1613 let aspectRatio = gl.drawingBufferWidth / gl.drawingBufferHeight;

Callers 1

updateColorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected