We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eea596c commit 0f5ff12Copy full SHA for 0f5ff12
lib/node_modules/@stdlib/math/base/assert/is-oddf/examples/index.js
@@ -18,16 +18,17 @@
18
19
'use strict';
20
21
-var randu = require( '@stdlib/random/base/randu' );
+var randu = require( '@stdlib/random/array/discrete-uniform' );
22
var roundf = require( '@stdlib/math/base/special/roundf' );
23
var isOddf = require( './../lib' );
24
25
var bool;
26
var x;
27
var i;
28
29
+x = randu( 100, -50, 50 );
30
+
31
for ( i = 0; i < 100; i++ ) {
- x = roundf( randu() * 100.0 );
- bool = isOddf( x );
32
+ bool = isOddf( x[ i % 100 ] );
33
console.log( '%d is %s', x, ( bool ) ? 'odd' : 'not odd' );
34
}
0 commit comments