@progress/kendo-vue-inputs
Version:
22 lines (21 loc) • 1.01 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
const n = (r, t) => {
if (r % 1) {
const o = Math.pow(10, (t.toString().split(".")[1] || t.toString().split(".")[0]).length);
return Math.round(r * o) / o;
}
return r;
}, s = (r, t) => r - t * Math.floor(r / t), i = (r, t, o) => n(r - o, o) < t && t < r, c = (r, t, o, f) => t === null ? !1 : f === "continues" ? i(r, t, o) ? n(r - o / 2, o / 2) <= t : r <= t : f === "single" ? i(r, t, o) ? n(r - o / 2, o / 2) === t : r === t : !1, h = (r, t, o) => r === "ltr" ? o < t.x + t.width / 2 : o > t.x + t.width / 2;
export {
h as calcIsFirstHalf,
s as getRemainder,
i as isHalf,
c as isSelected,
n as toRound
};