Skip to content

Commit 4f84e78

Browse files
committed
Use constantFunction and add empty lines
1 parent e7195c1 commit 4f84e78

3 files changed

Lines changed: 6 additions & 22 deletions

File tree

lib/node_modules/@stdlib/math/base/dist/degenerate/cdf/lib/cdf.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,19 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
1717
* @example
1818
* var y = cdf( 2.0, 3.0 );
1919
* // returns 0.0
20+
*
2021
* @example
2122
* var y = cdf( 4.0, 3.0 );
2223
* // returns 1.0
24+
*
2325
* @example
2426
* var y = cdf( 3.0, 3.0 );
2527
* // returns 1.0
28+
*
2629
* @example
2730
* var y = cdf( NaN, 0.0 );
2831
* // returns NaN
32+
*
2933
* @example
3034
* var y = cdf( 0.0, NaN );
3135
* // returns NaN

lib/node_modules/@stdlib/math/base/dist/degenerate/cdf/lib/factory.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// MODULES //
44

5+
var constantFunction = require( '@stdlib/utils/constant-function' );
56
var isnan = require( '@stdlib/math/base/assert/is-nan' );
6-
var nan = require( './nan.js' );
77

88

99
// MAIN //
@@ -28,7 +28,7 @@ var nan = require( './nan.js' );
2828
*/
2929
function factory( mu ) {
3030
if ( isnan( mu ) ) {
31-
return nan;
31+
return constantFunction( NaN );
3232
}
3333
return cdf;
3434

lib/node_modules/@stdlib/math/base/dist/degenerate/cdf/lib/nan.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)