UNPKG

@frontify/fondue-charts

Version:

Frontify's data viz library

16 lines (15 loc) • 969 B
const O = (L, P, T, H) => { const [M, I] = P, a = T / 2 + 4, t = a + 30; let E, s, h, N, _; return L <= Math.PI / 2 || H ? (E = M + Math.sin(L) * a, s = I - Math.cos(L) * a, h = M + Math.sin(L) * t, N = I - Math.cos(L) * t, _ = h + 15) : L > Math.PI / 2 && L <= Math.PI ? (E = M + Math.cos(L - Math.PI / 2) * a, s = I + Math.sin(L - Math.PI / 2) * a, h = M + Math.cos(L - Math.PI / 2) * t, N = I + Math.sin(L - Math.PI / 2) * t, _ = h + 15) : L > Math.PI && L < Math.PI * 1.5 ? (E = M - Math.sin(L - Math.PI) * a, s = I + Math.cos(L - Math.PI) * a, h = M - Math.sin(L - Math.PI) * t, N = I + Math.cos(L - Math.PI) * t, _ = h - 15) : (E = M - Math.cos(L - Math.PI * 1.5) * a, s = I - Math.sin(L - Math.PI * 1.5) * a, h = M - Math.cos(L - Math.PI * 1.5) * t, N = I - Math.sin(L - Math.PI * 1.5) * t, _ = h - 15), { x1: E, y1: s, x2: h, y2: N, x3: _ }; }; export { O as getLineCoordinates }; //# sourceMappingURL=getLineCoordinates.es.js.map