Files
illogical-impulse/dots/.config/quickshell/ii/modules/common/functions/NumberUtils.qml
T
2026-02-05 12:49:36 +01:00

17 lines
326 B
QML

pragma Singleton
import Quickshell
Singleton {
id: root
/**
* Rounds the given number to the nearest even integer.
*
* @param {number} num - The number to round.
* @returns {number} The nearest even integer.
*/
function roundToEven(num) {
return Math.round(num / 2) * 2;
}
}