Skip to content

Commit 5a9f9f8

Browse files
committed
refactor: changing function signature in mainc
--- 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: na - 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: missing_dependencies - 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: passed - task: run_c_examples status: passed - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: failed ---
1 parent ee09093 commit 5a9f9f8

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

lib/node_modules/@stdlib/math/base/special/minmaxf/include/stdlib/math/base/special/minmaxf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extern "C" {
2929
/**
3030
* Returns single-precision minimum and maximum floating-point number.
3131
*/
32-
void stdlib_base_minmaxf( float x, float y, float * out );
32+
void stdlib_base_minmaxf( float x, float y, float *min, float *max );
3333

3434
#ifdef __cplusplus
3535
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ static napi_value addon( napi_env env, napi_callback_info info ){
2727
STDLIB_NAPI_ARGV( env, info, argv, argc, 3 );
2828
STDLIB_NAPI_ARGV_FLOAT( env, x, argv, 0 );
2929
STDLIB_NAPI_ARGV_FLOAT( env, y, argv, 1 );
30-
STDLIB_NAPI_ARGV_FLOAT32ARRAY( env, out, ol, argv, 2 );
31-
stdlib_base_minmaxf( x, y, out);
30+
STDLIB_NAPI_ARGV_FLOAT32ARRAY(env, out, len, argv, 2 );
31+
stdlib_base_minmaxf( x, y, &out[0], &out[1] );
3232
return NULL;
3333
}
3434

lib/node_modules/@stdlib/math/base/special/minmaxf/src/main.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,28 @@
3636
* double out = [ 0.0, 0.0 ];
3737
* double v = stdlib_base_minmaxn( 4.0, 0.0/0.0, out );
3838
*/
39-
void stdlib_base_minmaxf( const float x, const float y, float * out ){
39+
void stdlib_base_minmaxf( const float x, const float y, float* min, float* max ){
4040
if ( stdlib_base_is_nanf( x ) || stdlib_base_is_nanf( y ) ) {
41-
out[ 0 ] = 0.0 / 0.0;
42-
out[ 1 ] = 0.0 / 0.0;
41+
*min = 0.0f / 0.0f;
42+
*max = 0.0f / 0.0f;
4343
return;
4444
}
4545
if ( x == y && x == 0.0 ) {
4646
if ( stdlib_base_is_negative_zerof( x ) ) {
47-
out[ 0 ] = x;
48-
out[ 1 ] = y;
47+
*min = x;
48+
*max = y;
4949
return;
5050
}
51-
out[ 0 ] = y;
52-
out[ 1 ] = x;
51+
*min = y;
52+
*max = x;
5353
return;
5454
}
5555
if ( x < y ) {
56-
out[ 0 ] = x;
57-
out[ 1 ] = y;
56+
*min = x;
57+
*max = y;
5858
return;
5959
}
60-
out[ 0 ] = y;
61-
out[ 1 ] = x;
60+
*min = y;
61+
*max = x;
6262
return;
6363
}

0 commit comments

Comments
 (0)