From 336415777dee6c201f845916ee045565ef6587b0 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Wed, 12 Jun 2024 02:33:55 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 3 ++- base/special/nanmin/README.md | 24 +++++++++++++++++++++--- base/special/nanmin/examples/index.js | 14 ++++++++------ base/special/nanmin/lib/main.js | 2 +- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a62b450c8..bf5d47a09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@
-## Unreleased (2024-06-10) +## Unreleased (2024-06-12)
@@ -4464,6 +4464,7 @@ A total of 26 people contributed to this release. Thank you to the following con
+- [`29fbbb6`](https://github.com/stdlib-js/stdlib/commit/29fbbb62d94cb2af1d8856004b75c03daf942053) - **chore:** minor clean-up _(by Philipp Burckhardt)_ - [`fb04f19`](https://github.com/stdlib-js/stdlib/commit/fb04f1968006f8bee36735f9b71d857f478bb6c1) - **refactor:** reduce test tolerance and fix casting [(#2356)](https://github.com/stdlib-js/stdlib/pull/2356) _(by Gunj Joshi)_ - [`ced30b0`](https://github.com/stdlib-js/stdlib/commit/ced30b0e285117ad5bcdf6cc940329aadc826e21) - **refactor:** use constant packages and remove unused include [(#2355)](https://github.com/stdlib-js/stdlib/pull/2355) _(by Gunj Joshi)_ - [`343da6f`](https://github.com/stdlib-js/stdlib/commit/343da6faa466294331be4befd603fde2faa83503) - **feat:** add C implementation for `math/base/special/cos` _(by Gunj Joshi, Philipp Burckhardt)_ diff --git a/base/special/nanmin/README.md b/base/special/nanmin/README.md index abfff4de8..8ed7694c3 100644 --- a/base/special/nanmin/README.md +++ b/base/special/nanmin/README.md @@ -62,13 +62,11 @@ v = nanmin( NaN, 3.14 ); // returns 3.14 ``` - -If both argument are `NaN`, the function returns `NaN`. +If both arguments are `NaN`, the function returns `NaN`. ```javascript var v = nanmin( NaN, NaN ); // returns NaN - ```
@@ -80,3 +78,23 @@ var v = nanmin( NaN, NaN );
+ + + + + + + + + + + + diff --git a/base/special/nanmin/examples/index.js b/base/special/nanmin/examples/index.js index 2d8bb2b50..54403cbcc 100644 --- a/base/special/nanmin/examples/index.js +++ b/base/special/nanmin/examples/index.js @@ -21,15 +21,17 @@ var nanmin = require( './../lib' ); var m = nanmin( 3.0, 4.0 ); -// returns 3.0 +console.log( m ); +// => 3.0 m = nanmin( NaN, 4.0 ); -// returns 4.0 +console.log( m ); +// => 4.0 m = nanmin( 4.0, NaN ); -// returns 4.0 +console.log( m ); +// => 4.0 m = nanmin( NaN, NaN ); -// returns NaN - -console.log(m); +console.log( m ); +// => NaN diff --git a/base/special/nanmin/lib/main.js b/base/special/nanmin/lib/main.js index 2f7c476bd..6a8b90f49 100644 --- a/base/special/nanmin/lib/main.js +++ b/base/special/nanmin/lib/main.js @@ -47,7 +47,7 @@ var isnan = require( './../../../../base/assert/is-nan'); */ function nanmin( x, y ) { if ( isnan( x ) ) { - return ( isnan(y) ) ? NaN : y; + return ( isnan( y ) ) ? NaN : y; } return ( isnan( y ) ) ? x : min( x, y ); }