You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function m(e,r){if(1!=arguments.length&&2!=arguments.length)throw new n.error.ArgumentsError("round",arguments.length,1,2);if(void 0==r){if(s(e))return Math.round(e);if(f(e))return new o(Math.round(e.re),Math.round(e.im));if(e instanceof i)return e.round();if(l(e))return a.deepMap(e,m);if(c(e))return Math.round(e);throw new n.error.UnsupportedTypeError("round",e)}if(r instanceof i&&(r=parseFloat(r.valueOf())),!s(r)||!u(r))throw new TypeError("Number of decimals in function round must be an integer");if(0>r||r>9)throw new Error("Number of decimals in function round must be in te range of 0-9");if(s(e))return t(e,r);if(f(e))return new o(t(e.re,r),t(e.im,r));if(e instanceof i&&s(r))return e.round(r);if(l(e)||l(r))return a.deepMap2(e,r,m);if(c(e))return m(+e,r);if(c(r))return m(e,+r);throw new n.error.UnsupportedTypeError("round",e,r)}
The text was updated successfully, but these errors were encountered:
Testcases:
round
sin
cos
tan
Error:
function m(e,r){if(1!=arguments.length&&2!=arguments.length)throw new n.error.ArgumentsError("round",arguments.length,1,2);if(void 0==r){if(s(e))return Math.round(e);if(f(e))return new o(Math.round(e.re),Math.round(e.im));if(e instanceof i)return e.round();if(l(e))return a.deepMap(e,m);if(c(e))return Math.round(e);throw new n.error.UnsupportedTypeError("round",e)}if(r instanceof i&&(r=parseFloat(r.valueOf())),!s(r)||!u(r))throw new TypeError("Number of decimals in function round must be an integer");if(0>r||r>9)throw new Error("Number of decimals in function round must be in te range of 0-9");if(s(e))return t(e,r);if(f(e))return new o(t(e.re,r),t(e.im,r));if(e instanceof i&&s(r))return e.round(r);if(l(e)||l(r))return a.deepMap2(e,r,m);if(c(e))return m(+e,r);if(c(r))return m(e,+r);throw new n.error.UnsupportedTypeError("round",e,r)}
The text was updated successfully, but these errors were encountered: