text: import{pluckNumber}from'../../lib/lib';const deg2Rad=a=>a*(Math.PI/180),rad2Deg=a=>a*(180/Math.PI),cartesianToPolar=(a,b)=>{var c,d;return c=Math.sqrt(a*a+b*b),d=rad2Deg(Math.atan(b/a)),0>a&&0<=b?d+=180:0>a&&0>b?d+=180:0<a&&0>b&&(d+=360),{radius:c,theta:deg2Rad(d)}},polarToCartesian=(a,b,c=!0)=>{var d,e;return c||(b=deg2Rad(b)),d=a*Math.cos(b),e=a*Math.sin(b),{x:d,y:e}},getCoordinates=(a,b)=>{let c,d,e=b.getScale(),f=a.radius,g=b.config,h=g.axisDimention.centerX,i=g.axisDimention.centerY;return f=pluckNumber(f,g.radius,0),c=e.getRangeValue(a.theta),d=polarToCartesian(f,c),d.x+=h,d.y+=i,d},getPlotFromPixel=(a,b)=>{let c,d,e=a.x,f=a.y,g=b.getScale();return d=cartesianToPolar(e,f),c=g.getDomainValue(d.theta),rad2Deg(c)};export{cartesianToPolar,polarToCartesian,getPlotFromPixel,getCoordinates};