Skip to content

Commit bff28a2

Browse files
committed
docs: fix examples
--- 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: passed - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 3e135f3 commit bff28a2

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

lib/node_modules/@stdlib/math/base/special/cpolarf/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ var bool = ( v === out );
7676

7777
```javascript
7878
var Complex64 = require( '@stdlib/complex/float32/ctor' );
79-
var randu = require( '@stdlib/random/base/randu' );
80-
var roundf = require( '@stdlib/math/base/special/roundf' );
79+
var uniform = require( '@stdlib/random/base/uniform' );
8180
var cpolarf = require( '@stdlib/math/base/special/cpolarf' );
8281

8382
var re;
@@ -87,12 +86,12 @@ var o;
8786
var i;
8887

8988
for ( i = 0; i < 100; i++ ) {
90-
re = roundf( randu()*100.0 ) - 50.0;
91-
im = roundf( randu()*100.0 ) - 50.0;
89+
re = uniform( -50.0, 50.0 );
90+
im = uniform( -50.0, 50.0 );
9291
z = new Complex64( re, im );
9392
o = cpolarf( z );
9493
z = z.toString();
95-
console.log( 'absf(%s) = %d. argf(%s) = %d', z, o[0], z, o[1] );
94+
console.log( 'absf(%s) = %d. argf(%s) = %d', z, o[ 0 ], z, o[ 1 ] );
9695
}
9796
```
9897

lib/node_modules/@stdlib/math/base/special/cpolarf/examples/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
'use strict';
2020

2121
var Complex64 = require( '@stdlib/complex/float32/ctor' );
22-
var randu = require( '@stdlib/random/base/randu' );
23-
var roundf = require( '@stdlib/math/base/special/roundf' );
22+
var uniform = require( '@stdlib/random/base/uniform' );
2423
var cpolarf = require( './../lib' );
2524

2625
var re;
@@ -30,10 +29,10 @@ var o;
3029
var i;
3130

3231
for ( i = 0; i < 100; i++ ) {
33-
re = roundf( randu()*100.0 ) - 50.0;
34-
im = roundf( randu()*100.0 ) - 50.0;
32+
re = uniform( -50.0, 50.0 );
33+
im = uniform( -50.0, 50.0 );
3534
z = new Complex64( re, im );
3635
o = cpolarf( z );
3736
z = z.toString();
38-
console.log( 'absf(%s) = %d. argf(%s) = %d', z, o[0], z, o[1] );
37+
console.log( 'absf(%s) = %d. argf(%s) = %d', z, o[ 0 ], z, o[ 1 ] );
3938
}

0 commit comments

Comments
 (0)