Skip to content

Commit 74a62b6

Browse files
authored
docs: update examples for complex/float32/base/add
PR-URL: #7288 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent a0a44c6 commit 74a62b6

File tree

5 files changed

+5
-49
lines changed

5 files changed

+5
-49
lines changed

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,11 @@ Adds two single-precision complex floating-point numbers.
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 z = new Complex64( -1.5, 2.5 );
4947

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

6052
</section>

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,11 @@ import { Complex64 } from '@stdlib/types/complex';
3131
*
3232
* @example
3333
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
34-
* var realf = require( '@stdlib/complex/float32/real' );
35-
* var imagf = require( '@stdlib/complex/float32/imag' );
3634
*
3735
* var z = new Complex64( 5.0, 3.0 );
38-
* // returns <Complex64>
3936
*
4037
* var out = add( z, z );
41-
* // returns <Complex64>
42-
*
43-
* var re = realf( out );
44-
* // returns 10.0
45-
*
46-
* var im = imagf( out );
47-
* // returns 6.0
38+
* // returns <Complex64>[ 10.0, 6.0 ]
4839
*/
4940
declare function add( z1: Complex64, z2: Complex64 ): Complex64;
5041

lib/node_modules/@stdlib/complex/float32/base/add/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 add = require( '@stdlib/complex/float32/base/add' );
3129
*
3230
* var z = new Complex64( 5.0, 3.0 );
33-
* // returns <Complex64>
3431
*
3532
* var out = add( z, z );
36-
* // returns <Complex64>
37-
*
38-
* var re = realf( out );
39-
* // returns 10.0
40-
*
41-
* var im = imagf( out );
42-
* // returns 6.0
33+
* // returns <Complex64>[ 10.0, 6.0 ]
4334
*/
4435

4536
// MODULES //

lib/node_modules/@stdlib/complex/float32/base/add/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 = add( z, z );
47-
* // returns <Complex64>
48-
*
49-
* var re = realf( out );
50-
* // returns 10.0
51-
*
52-
* var im = imagf( out );
53-
* // returns 6.0
44+
* // returns <Complex64>[ 10.0, 6.0 ]
5445
*/
5546
function add( z1, z2 ) {
5647
var re = f32( realf( z1 ) + realf( z2 ) );

lib/node_modules/@stdlib/complex/float32/base/add/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 = add( z, z );
46-
* // returns <Complex64>
47-
*
48-
* var re = realf( out );
49-
* // returns 10.0
50-
*
51-
* var im = imagf( out );
52-
* // returns 6.0
43+
* // returns <Complex64>[ 10.0, 6.0 ]
5344
*/
5445
function add( z1, z2 ) {
5546
var v = addon( z1, z2 );

0 commit comments

Comments
 (0)