{"version":3,"sources":["node_modules/@arcgis/core/core/Cyclical.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { clamp as t } from \"./mathUtils.js\";\nclass n {\n constructor(t, n) {\n this.min = t, this.max = n, this.range = n - t;\n }\n normalize(t, n = 0, o = !1) {\n return i(this.range, this.min, this.max, t, n, o);\n }\n clamp(n, i = 0) {\n return t(n - i, this.min, this.max) + i;\n }\n monotonic(t, n, i) {\n return t < n ? n : n + o(this.range, t - n, i);\n }\n minimalMonotonic(t, n, o) {\n return i(this.range, t, t + this.range, n, o);\n }\n center(t, n, i) {\n return n = this.monotonic(t, n, i), this.normalize((t + n) / 2, i);\n }\n diff(t, n, i) {\n return this.monotonic(t, n, i) - t;\n }\n shortestSignedDiff(t, n) {\n t = this.normalize(t);\n const i = (n = this.normalize(n)) - t,\n o = n < t ? this.minimalMonotonic(t, n) - t : n - this.minimalMonotonic(n, t);\n return Math.abs(i) < Math.abs(o) ? i : o;\n }\n contains(t, n, i) {\n return n = this.minimalMonotonic(t, n), (i = this.minimalMonotonic(t, i)) > t && i < n;\n }\n}\nfunction i(t, n, i, r, s = 0, a = !1) {\n return (r -= s) < n ? r += o(t, n - r) : r > i && (r -= o(t, r - i)), a && r === i && (r = n), r + s;\n}\nfunction o(t, n, i = 0) {\n return Math.ceil((n - i) / t) * t + i;\n}\nconst r = new n(0, 2 * Math.PI),\n s = new n(-Math.PI, Math.PI),\n a = new n(0, 360);\nexport { n as Cyclical, r as cyclical2PI, a as cyclicalDegrees, s as cyclicalPI };"],"mappings":"wCAKA,IAAMA,EAAN,KAAQ,CACN,YAAY,EAAGA,EAAG,CAChB,KAAK,IAAM,EAAG,KAAK,IAAMA,EAAG,KAAK,MAAQA,EAAI,CAC/C,CACA,UAAU,EAAGA,EAAI,EAAGC,EAAI,GAAI,CAC1B,OAAOC,EAAE,KAAK,MAAO,KAAK,IAAK,KAAK,I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