Skip to content

Commit 2f8d38f

Browse files
committed
feat: use for identity
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 306aba9 commit 2f8d38f

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

  • lib/node_modules/@stdlib/number/float32/base/identity/examples

lib/node_modules/@stdlib/number/float32/base/identity/examples/index.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,10 @@
1818

1919
'use strict';
2020

21-
var randu = require( '@stdlib/random/base/randu' );
22-
var round = require( '@stdlib/math/base/special/round' );
21+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
22+
var logEachMap = require( '@stdlib/console/log-each-map' );
2323
var identityf = require( './../lib' );
2424

25-
var rand;
26-
var i;
25+
var x = discreteUniform( 100, -50, 50 );
2726

28-
for ( i = 0; i < 100; i++ ) {
29-
rand = round( randu() * 100.0 ) - 50.0;
30-
console.log( 'identity(%d) = %d', rand, identityf( rand ) );
31-
}
27+
logEachMap( 'identity(%d) = %d', x, identityf );

0 commit comments

Comments
 (0)