File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
lib/node_modules/@stdlib/stats/incr/nanmidrange Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ console.log( '\nValue\tMid-range\n' );
3333
3434// For each simulated datum, update the mid-range...
3535for ( i = 0 ; i < 100 ; i ++ ) {
36- v = ( randu ( ) < 0.1 ) ? NaN : randu ( ) * 100.0 ;
37- midrange = accumulator ( v ) ;
38- console . log ( '%d\t%s' , v . toFixed ( 4 ) , midrange !== null ? midrange . toFixed ( 4 ) : 'null' ) ;
36+ v = ( randu ( ) < 0.1 ) ? NaN : randu ( ) * 100.0 ;
37+ midrange = accumulator ( v ) ;
38+ console . log ( '%d\t%s' , v . toFixed ( 4 ) , midrange !== null ? midrange . toFixed ( 4 ) : 'null' ) ;
3939}
4040
4141console . log ( '\nFinal mid-range: %s\n' , accumulator ( ) !== null ? accumulator ( ) . toFixed ( 4 ) : 'null' ) ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ var incrmidrange = require( '@stdlib/stats/incr/midrange' );
3232* @returns {Function } accumulator function
3333*
3434* @example
35- * var accumulator = incrmidrange ();
35+ * var accumulator = incrnanmidrange ();
3636*
3737* var midrange = accumulator();
3838* // returns null
You can’t perform that action at this time.
0 commit comments