Files
dots-hyprland/dots/.config/quickshell/ii/modules/common/functions/NumberUtils.qml
T
2026-03-21 11:54:47 +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;
}
}