Skip to content

Commit 7188b0d

Browse files
authored
docs: improve doctests for complex number instances in math/base/special/cflipsign
PR-URL: #9815 Ref: #8641 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent b5ee1c6 commit 7188b0d

6 files changed

Lines changed: 6 additions & 49 deletions

File tree

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,10 @@ Returns a double-precision complex floating-point number with the same magnitude
4646

4747
```javascript
4848
var Complex128 = require( '@stdlib/complex/float64/ctor' );
49-
var real = require( '@stdlib/complex/float64/real' );
50-
var imag = require( '@stdlib/complex/float64/imag' );
5149

5250
var v = cflipsign( new Complex128( -4.2, 5.5 ), -1.0 );
53-
// returns <Complex128>
51+
// returns <Complex128>[ 4.2, -5.5 ]
5452

55-
var re = real( v );
56-
// returns 4.2
57-
58-
var im = imag( v );
59-
// returns -5.5
6053
```
6154

6255
</section>

lib/node_modules/@stdlib/math/base/special/cflipsign/docs/repl.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@
1919
Examples
2020
--------
2121
> var v = {{alias}}( new {{alias:@stdlib/complex/float64/ctor}}( -4.2, 5.5 ), -9.0 )
22-
<Complex128>
23-
> var re = {{alias:@stdlib/complex/float64/real}}( v )
24-
4.2
25-
> var im = {{alias:@stdlib/complex/float64/imag}}( v )
26-
-5.5
22+
<Complex128>[ 4.2, -5.5 ]
2723

2824
See Also
2925
--------

lib/node_modules/@stdlib/math/base/special/cflipsign/docs/types/index.d.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,9 @@ import { Complex128 } from '@stdlib/types/complex';
3131
*
3232
* @example
3333
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
34-
* var real = require( '@stdlib/complex/float64/real' );
35-
* var imag = require( '@stdlib/complex/float64/imag' );
3634
*
3735
* var v = cflipsign( new Complex128( -4.2, 5.5 ), -55.0 );
38-
* // returns <Complex128>
39-
*
40-
* var re = real( v );
41-
* // returns 4.2
42-
*
43-
* var im = imag( v );
44-
* // returns -5.5
36+
* // returns <Complex128>[ 4.2, -5.5 ]
4537
*/
4638
declare function cflipsign( z: Complex128, y: number ): Complex128;
4739

lib/node_modules/@stdlib/math/base/special/cflipsign/lib/index.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,10 @@
2525
*
2626
* @example
2727
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
28-
* var real = require( '@stdlib/complex/float64/real' );
29-
* var imag = require( '@stdlib/complex/float64/imag' );
3028
* var cflipsign = require( '@stdlib/math/base/special/cflipsign' );
3129
*
3230
* var v = cflipsign( new Complex128( -4.2, 5.5 ), -55.0 );
33-
* // returns <Complex128>
34-
*
35-
* var re = real( v );
36-
* // returns 4.2
37-
*
38-
* var im = imag( v );
39-
* // returns -5.5
31+
* // returns <Complex128>[ 4.2, -5.5 ]
4032
*/
4133

4234
// MODULES //

lib/node_modules/@stdlib/math/base/special/cflipsign/lib/main.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,9 @@ var imag = require( '@stdlib/complex/float64/imag' );
3737
*
3838
* @example
3939
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
40-
* var real = require( '@stdlib/complex/float64/real' );
41-
* var imag = require( '@stdlib/complex/float64/imag' );
4240
*
4341
* var v = cflipsign( new Complex128( -4.2, 5.5 ), -55.0 );
44-
* // returns <Complex128>
45-
*
46-
* var re = real( v );
47-
* // returns 4.2
48-
*
49-
* var im = imag( v );
50-
* // returns -5.5
42+
* // returns <Complex128>[ 4.2, -5.5 ]
5143
*/
5244
function cflipsign( z, y ) {
5345
var re = real( z );

lib/node_modules/@stdlib/math/base/special/cflipsign/lib/native.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,9 @@ var addon = require( './../src/addon.node' );
3636
*
3737
* @example
3838
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
39-
* var real = require( '@stdlib/complex/float64/real' );
40-
* var imag = require( '@stdlib/complex/float64/imag' );
4139
*
4240
* var v = cflipsign( new Complex128( -4.2, 5.5 ), -55.0 );
43-
* // returns <Complex128>
44-
*
45-
* var re = real( v );
46-
* // returns 4.2
47-
*
48-
* var im = imag( v );
49-
* // returns -5.5
41+
* // returns <Complex128>[ 4.2, -5.5 ]
5042
*/
5143
function cflipsign( z, y ) {
5244
var v = addon( z, y );

0 commit comments

Comments
 (0)