UNPKG

@serendie/ui

Version:

Adaptive UI component library as part of Serendie Design System by Mitsubishi Electric

14 lines (13 loc) 368 B
const A = (n, e, t, o, s) => { const a = (l, p, $, g) => { const M = (g - 90) * Math.PI / 180; return { x: l + $ * Math.cos(M), y: p + $ * Math.sin(M) }; }, c = a(n, e, t, s), r = a(n, e, t, o), h = Math.abs((s - o) % 360) <= 180 ? "0" : "1"; return `M ${c.x} ${c.y} A ${t} ${t} 0 ${h} 0 ${r.x} ${r.y}`; }; export { A as describeArc };