Skip to content

Commit 30c471f

Browse files
authored
docs: update examples for complex/float32/base/scale
PR-URL: #7292 Reviewed-by: Athan Reines <[email protected]>
1 parent 93d2533 commit 30c471f

File tree

5 files changed

+6
-59
lines changed

5 files changed

+6
-59
lines changed

lib/node_modules/@stdlib/complex/float32/base/scale/README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,11 @@ Scales a single-precision complex floating-point number by a real-valued single-
4242

4343
```javascript
4444
var Complex64 = require( '@stdlib/complex/float32/ctor' );
45-
var realf = require( '@stdlib/complex/float32/real' );
46-
var imagf = require( '@stdlib/complex/float32/imag' );
4745

4846
var c = new Complex64( 5.0, 3.0 );
4947

5048
var v = scale( 5.0, c );
51-
// returns <Complex64>
52-
53-
var re = realf( v );
54-
// returns 25.0
55-
56-
var im = imagf( v );
57-
// returns 15.0
49+
// returns <Complex64>[ 25.0, 15.0 ]
5850
```
5951

6052
The function supports the following parameters:

lib/node_modules/@stdlib/complex/float32/base/scale/docs/types/index.d.ts

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,11 @@ interface Scale {
3636
*
3737
* @example
3838
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
39-
* var realf = require( '@stdlib/complex/float32/real' );
40-
* var imagf = require( '@stdlib/complex/float32/imag' );
4139
*
4240
* var z = new Complex64( 5.0, 3.0 );
43-
* // returns <Complex64>
4441
*
4542
* var out = scale( 5.0, z );
46-
* // returns <Complex64>
47-
*
48-
* var re = realf( out );
49-
* // returns 25.0
50-
*
51-
* var im = imagf( out );
52-
* // returns 15.0
43+
* // returns <Complex64>[ 25.0, 15.0 ]
5344
*/
5445
( alpha: number, z: Complex64 ): Complex64;
5546

@@ -108,20 +99,11 @@ interface Scale {
10899
*
109100
* @example
110101
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
111-
* var realf = require( '@stdlib/complex/float32/real' );
112-
* var imagf = require( '@stdlib/complex/float32/imag' );
113102
*
114103
* var z = new Complex64( 5.0, 3.0 );
115-
* // returns <Complex64>
116104
*
117105
* var out = scale( 5.0, z );
118-
* // returns <Complex64>
119-
*
120-
* var re = realf( out );
121-
* // returns 25.0
122-
*
123-
* var im = imagf( out );
124-
* // returns 15.0
106+
* // returns <Complex64>[ 25.0, 15.0 ]
125107
*
126108
* @example
127109
* var Float32Array = require( '@stdlib/array/float32' );

lib/node_modules/@stdlib/complex/float32/base/scale/lib/index.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,12 @@
2525
*
2626
* @example
2727
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
28-
* var realf = require( '@stdlib/complex/float32/real' );
29-
* var imagf = require( '@stdlib/complex/float32/imag' );
3028
* var scale = require( '@stdlib/complex/float32/base/scale' );
3129
*
3230
* var z = new Complex64( 5.0, 3.0 );
33-
* // returns <Complex64>
3431
*
3532
* var out = scale( scalar, z );
36-
* // returns <Complex64>
37-
*
38-
* var re = realf( out );
39-
* // returns 25.0
40-
*
41-
* var im = imagf( out );
42-
* // returns 15.0
33+
* // returns <Complex64>[ 25.0, 15.0 ]
4334
*/
4435

4536
// MODULES //

lib/node_modules/@stdlib/complex/float32/base/scale/lib/main.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,11 @@ var imagf = require( '@stdlib/complex/float32/imag' );
3737
*
3838
* @example
3939
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
40-
* var realf = require( '@stdlib/complex/float32/real' );
41-
* var imagf = require( '@stdlib/complex/float32/imag' );
4240
*
4341
* var z = new Complex64( 5.0, 3.0 );
44-
* // returns <Complex64>
4542
*
4643
* var out = scale( 5.0, z );
47-
* // returns <Complex64>
48-
*
49-
* var re = realf( out );
50-
* // returns 25.0
51-
*
52-
* var im = imagf( out );
53-
* // returns 15.0
44+
* // returns <Complex64>[ 25.0, 15.0 ]
5445
*/
5546
function scale( alpha, z ) {
5647
return new Complex64( f32( realf(z)*alpha ), f32( imagf(z)*alpha ) );

lib/node_modules/@stdlib/complex/float32/base/scale/lib/native.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,11 @@ var addon = require( './../src/addon.node' );
3636
*
3737
* @example
3838
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
39-
* var realf = require( '@stdlib/complex/float32/real' );
40-
* var imagf = require( '@stdlib/complex/float32/imag' );
4139
*
4240
* var z = new Complex64( 5.0, 3.0 );
43-
* // returns <Complex64>
4441
*
4542
* var out = scale( 5.0, z );
46-
* // returns <Complex64>
47-
*
48-
* var re = realf( out );
49-
* // returns 25.0
50-
*
51-
* var im = imagf( out );
52-
* // returns 15.0
43+
* // returns <Complex64>[ 25.0, 15.0 ]
5344
*/
5445
function scale( alpha, z ) {
5546
var v = addon( alpha, z );

0 commit comments

Comments
 (0)