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
Invokes a ternary function accepting a double-precision floating-point number and two signed 32-bit integers and returning a double-precision floating-point number.
188
+
189
+
```c
190
+
#include<node_api.h>
191
+
#include<stdint.h>
192
+
193
+
// ...
194
+
195
+
staticdoublefcn( const double x, const int32_t y, const int32_t z ) {
196
+
// ...
197
+
}
198
+
199
+
// ...
200
+
201
+
/**
202
+
* Receives JavaScript callback invocation data.
203
+
*
204
+
*@param env environment under which the function is invoked
205
+
*@param info callback data
206
+
*@return Node-API value
207
+
*/
208
+
napi_value addon( napi_env env, napi_callback_info info ) {
Macro for registering a Node-API module exporting an interface for invoking a ternary function accepting and returning double-precision floating-point numbers.
@@ -224,6 +264,29 @@ The macro expects the following arguments:
224
264
225
265
When used, this macro should be used **instead of**`NAPI_MODULE`. The macro includes `NAPI_MODULE`, thus ensuring Node-API module registration.
226
266
267
+
#### STDLIB_MATH_BASE_NAPI_MODULE_DII_D( fcn )
268
+
269
+
Macro for registering a Node-API module exporting an interface for invoking a ternary function accepting a double-precision floating-point number and two signed 32-bit integers and returning a double-precision floating-point number.
270
+
271
+
```c
272
+
#include<stdint.h>
273
+
274
+
staticdoublefcn( const double x, const int32_t y, const int32_t z ) {
* Macro for registering a Node-API module exporting an interface invoking a ternary function accepting a double-precision floating-point number and two signed 32-bit integers and returning a double-precision floating-point number.
107
+
*
108
+
* @param fcn ternary function
109
+
*
110
+
* @example
111
+
* #include <stdint.h>
112
+
*
113
+
* static double fcn( const double x, const int_32 y, const int_32 z ) {
* Invokes a ternary function accepting a double-precision floating-point number and two signed 32-bit integers and returning a double-precision floating-point number.
* Invokes a ternary function accepting a double-precision floating-point number and two signed 32-bit integers and returning a double-precision floating-point number.
178
+
*
179
+
* ## Notes
180
+
*
181
+
* - This function expects that the callback `info` argument provides access to the following JavaScript arguments:
182
+
*
183
+
* - `x`: input value.
184
+
* - `y`: input value.
185
+
* - `z`: input value.
186
+
*
187
+
* @param env environment under which the function is invoked
188
+
* @param info callback data
189
+
* @param fcn ternary function
190
+
* @return function return value as a Node-API double-precision floating-point number
0 commit comments