Skip to content

Commit 987ae64

Browse files
committed
[fix]: resolved C linting error
1 parent e00e57c commit 987ae64

File tree

1 file changed

+0
-19
lines changed
  • lib/node_modules/@stdlib/math/base/special/roundn/src

1 file changed

+0
-19
lines changed

lib/node_modules/@stdlib/math/base/special/roundn/src/addon.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19-
#include <node_api.h>
20-
#include <math.h>
2119
#include "stdlib/math/base/special/roundn.h"
2220
#include "stdlib/math/base/napi/binary.h"
2321

24-
double stdlib_base_roundn(double x, int n) {
25-
double factor = pow(10, n);
26-
return round(x / factor) * factor;
27-
}
28-
29-
NAPI_MODULE_INIT() {
30-
napi_value fn;
31-
napi_status status = napi_create_function(env, NULL, 0, stdlib_base_roundn, NULL, &fn);
32-
if (status != napi_ok) {
33-
napi_throw_error(env, NULL, "Unable to create function");
34-
return NULL;
35-
}
36-
37-
return fn;
38-
}
39-
40-
4122
STDLIB_MATH_BASE_NAPI_MODULE_DI_D(stdlib_base_roundn)

0 commit comments

Comments
 (0)