import { a } from "./chunk-RYY6632W.js"; // node_modules/@arcgis/core/core/Cyclical.js var i = class { constructor(n, i2) { this.min = n, this.max = i2, this.range = i2 - n; } ndiff(n, i2 = 0) { return Math.ceil((n - i2) / this.range) * this.range + i2; } _normalize(n, i2, t2, o2 = 0, r2 = false) { return (t2 -= o2) < n ? t2 += this.ndiff(n - t2) : t2 > i2 && (t2 -= this.ndiff(t2 - i2)), r2 && t2 === i2 && (t2 = n), t2 + o2; } normalize(n, i2 = 0, t2 = false) { return this._normalize(this.min, this.max, n, i2, t2); } clamp(i2, t2 = 0) { return a(i2 - t2, this.min, this.max) + t2; } monotonic(n, i2, t2) { return n < i2 ? i2 : i2 + this.ndiff(n - i2, t2); } minimalMonotonic(n, i2, t2) { return this._normalize(n, n + this.range, i2, t2); } center(n, i2, t2) { return i2 = this.monotonic(n, i2, t2), this.normalize((n + i2) / 2, t2); } diff(n, i2, t2) { return this.monotonic(n, i2, t2) - n; } shortestSignedDiff(n, i2) { n = this.normalize(n); const t2 = (i2 = this.normalize(i2)) - n, o2 = i2 < n ? this.minimalMonotonic(n, i2) - n : i2 - this.minimalMonotonic(i2, n); return Math.abs(t2) < Math.abs(o2) ? t2 : o2; } contains(n, i2, t2) { return i2 = this.minimalMonotonic(n, i2), (t2 = this.minimalMonotonic(n, t2)) > n && t2 < i2; } }; function t(n) { for (const i2 in n) { const t2 = n[i2]; t2 instanceof Function && (n[i2] = t2.bind(n)); } return n; } var o = t(new i(0, 2 * Math.PI)); var r = t(new i(-Math.PI, Math.PI)); var s = t(new i(0, 360)); export { s }; //# sourceMappingURL=chunk-AJFR3FGC.js.map