diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index 060e0ff..7d35cfe 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -112,4 +112,8 @@ function Library (ronin) { this.clamp = function (val, min, max) { return Math.min(max, Math.max(min, val)) } + + this.step = function (val, step) { + return Math.round(val / step) * step + } }