Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ out = stdlib_base_int32_is_odd( -2 );

The function accepts the following arguments:

- **x**: `[in] double` input value.
- **x**: `[in] int32_t` input value.

```c
bool stdlib_base_int32_is_odd( const double x );
bool stdlib_base_int32_is_odd( const int32_t x );
```

</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var addon = require( './../src/addon.node' );
* Tests if a 32-bit integer is odd.
*
* @private
* @param {number} x - value to test
* @param {integer32} x - value to test
* @returns {boolean} boolean indicating whether the number is odd
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
return NULL;
}

double x;
status = napi_get_value_double( env, argv[ 0 ], &x );
int32_t x;
status = napi_get_value_int32( env, argv[ 0 ], &x );
assert( status == napi_ok );

bool result = stdlib_base_int32_is_odd( x );
Expand Down