Skip to content

Commit e4e96a2

Browse files
chore: catchup with last commit
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent 97c5b94 commit e4e96a2

File tree

1 file changed

+40
-0
lines changed
  • lib/node_modules/@stdlib/math/base/napi/binary

1 file changed

+40
-0
lines changed

lib/node_modules/@stdlib/math/base/napi/binary/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,46 @@ The function accepts the following arguments:
331331
void stdlib_math_base_napi_di_d( napi_env env, napi_callback_info info, double (*fcn)( double, int32_t ) );
332332
```
333333
334+
#### stdlib_math_base_napi_id_d( env, info, fcn )
335+
336+
Invokes a binary function accepting a signed 32-bit integer and a double-precision floating-point number and returning a double-precision floating-point number.
337+
338+
```c
339+
#include <node_api.h>
340+
#include <stdint.h>
341+
342+
// ...
343+
344+
static double mul( const int32_t x, const double y ) {
345+
return x * y;
346+
}
347+
348+
// ...
349+
350+
/**
351+
* Receives JavaScript callback invocation data.
352+
*
353+
* @param env environment under which the function is invoked
354+
* @param info callback data
355+
* @return Node-API value
356+
*/
357+
napi_value addon( napi_env env, napi_callback_info info ) {
358+
return stdlib_math_base_napi_id_d( env, info, mul );
359+
}
360+
361+
// ...
362+
```
363+
364+
The function accepts the following arguments:
365+
366+
- **env**: `[in] napi_env` environment under which the function is invoked.
367+
- **info**: `[in] napi_callback_info` callback data.
368+
- **fcn**: `[in] double (*fcn)( int32_t, double )` binary function.
369+
370+
```c
371+
void stdlib_math_base_napi_id_d( napi_env env, napi_callback_info info, double (*fcn)( int32_t, double ) );
372+
```
373+
334374
#### stdlib_math_base_napi_ii_i( env, info, fcn )
335375
336376
Invokes a binary function accepting and returning signed 32-bit integers.

0 commit comments

Comments
 (0)