{"ScriptPreparationCode":"const abs = Math.abs, min = Math.min, max = Math.max, PI = Math.PI, PI2 = PI / 2;\r\nvar fastAtan2 = (y, x) =\u003E {\r\n let ax = abs(x);\r\n let ay = abs(y);\r\n let a = min(ax, ay) / max(x, y);\r\n let s = a * a;\r\n let r = ((-0.0464964749 * s \u002B 0.15931422) * s - 0.327622764) * s * a \u002B a;\r\n if (ay \u003E ax) r = PI2 - r;\r\n if (x \u003C 0) r = PI - r;\r\n if (y \u003C 0) r = -r;\r\n return r;\r\n}; //this is the fastest i can get it rn\r\nvar atan2 = Math.atan2;","TestCases":[{"Name":"Math.atan2","Code":"eval(\u0027\u0027);\r\nvar k = [1, .23, 0.12, 929, 8172, 9.2, 21.2].map(e =\u003E Math.atan2(e, .5));","IsDeferred":false},{"Name":"fast approx. atan2","Code":"eval(\u0027\u0027);\r\nvar k = [1, .23, 0.12, 929, 8172, 9.2, 21.2].map(e =\u003E fastAtan2(e, .5));","IsDeferred":false},{"Name":"cached Math.atan2","Code":"eval(\u0027\u0027);\r\nvar k = [1, .23, 0.12, 929, 8172, 9.2, 21.2].map(e =\u003E atan2(e, .5));","IsDeferred":false}]}