UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

20 lines (19 loc) 487 B
"use client"; import "react"; var o = Math.PI / 180, s = (r, e, a, t) => ({ x: r + Math.cos(-o * t) * a, y: e + Math.sin(-o * t) * a }), i = function(e, a) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { top: 0, right: 0, bottom: 0, left: 0 }; return Math.min(Math.abs(e - (t.left || 0) - (t.right || 0)), Math.abs(a - (t.top || 0) - (t.bottom || 0))) / 2; }; export { o as RADIAN, i as getMaxRadius, s as polarToCartesian };