Skip to content

Commit f8d7e04

Browse files
committed
fix: order validation checks by parameter position in stats/base/dists/cauchy/pdf/lib/factory.js
Reorder NaN guards in the factory so checks follow declaration order `(x0, gamma)`. Behavior unchanged: any matching branch returns `constantFunction( NaN )`.
1 parent 168b97a commit f8d7e04

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • lib/node_modules/@stdlib/stats/base/dists/cauchy/pdf/lib

lib/node_modules/@stdlib/stats/base/dists/cauchy/pdf/lib/factory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ var PI = require( '@stdlib/constants/float64/pi' );
4747
function factory( x0, gamma ) {
4848
var gpi;
4949
if (
50-
isnan( gamma ) ||
5150
isnan( x0 ) ||
51+
isnan( gamma ) ||
5252
gamma <= 0.0
5353
) {
5454
return constantFunction( NaN );

0 commit comments

Comments
 (0)