File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
lib/node_modules/@stdlib/math/base/assert/is-oddf Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -85,18 +85,18 @@ bool = isOddf( NaN );
8585<!-- eslint no- undef: " error" -->
8686
8787` ` ` javascript
88- var randu = require( '@stdlib/random/base/randu' );
89- var roundf = require( '@stdlib/math/base/special/roundf' );
90- var isOddf = require( '@stdlib/math/base/assert/is-oddf' );
88+ var randu = require( '@stdlib/random/array/discrete-uniform' );
89+ var isOddf = require( './../lib' );
9190
9291var bool;
9392var x;
9493var i;
9594
95+ x = randu( 100, -50, 50 );
96+
9697for ( i = 0; i < 100; i++ ) {
97- x = roundf( randu() * 100.0 );
98- bool = isOddf( x );
99- console.log( '%d is %s', x, ( bool ) ? 'odd' : 'not odd' );
98+ bool = isOddf( x[ i % 100 ] );
99+ console.log( '%d is %s', x[ i % 100 ], ( bool ) ? 'odd' : 'not odd' );
100100}
101101` ` `
102102
You can’t perform that action at this time.
0 commit comments