Pixel-Composer/scripts/value_snap/value_snap.gml
2023-03-19 15:17:39 +07:00

4 lines
No EOL
99 B
Text

function value_snap(val, snap = 1) {
if(snap == 0) return val;
return round(val / snap) * snap;
}