UNPKG

@progress/kendo-vue-inputs

Version:
26 lines (25 loc) 980 B
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ const m = (o, t) => { const n = t[0] - o[0], s = t[1] - o[1]; return { length: Math.sqrt(Math.pow(n, 2) + Math.pow(s, 2)), angle: Math.atan2(s, n) }; }, p = (o) => (t, n, s, c) => { const e = n || t, h = s || t, a = 0.1, l = o(e, h), g = l.angle + (c ? Math.PI : 0), M = l.length * a, $ = t[0] + Math.cos(g) * M, r = t[1] + Math.sin(g) * M; return [$, r]; }, X = (o) => (t, n, s) => { const [c, e] = o(s[n - 1], s[n - 2], t), [h, a] = o(t, s[n - 1], s[n + 1], !0); return `C ${c},${e} ${h},${a} ${t[0]},${t[1]}`; }; export { X as bezierCommand, p as controlPoint, m as line };