diff --git a/lib/node_modules/@stdlib/complex/base/wrap-function/README.md b/lib/node_modules/@stdlib/complex/base/wrap-function/README.md index 4d6e26e540be..c7e0ecea1137 100644 --- a/lib/node_modules/@stdlib/complex/base/wrap-function/README.md +++ b/lib/node_modules/@stdlib/complex/base/wrap-function/README.md @@ -86,8 +86,6 @@ The function accepts the following arguments: ```javascript var Complex64 = require( '@stdlib/complex/float32/ctor' ); var caddf = require( '@stdlib/complex/float32/base/add' ); -var realf = require( '@stdlib/complex/float32/real' ); -var imagf = require( '@stdlib/complex/float32/imag' ); var wrap = require( '@stdlib/complex/base/wrap-function' ); var f = wrap( caddf, 2, Complex64 ); @@ -95,15 +93,9 @@ var f = wrap( caddf, 2, Complex64 ); // ... var z = f( 3.0, 4.0 ); -// returns +// returns [ 7.0, 0.0 ] -var re = realf( z ); -// returns 7.0 - -var im = imagf( z ); -// returns 0.0 - -console.log( '%d + %di', re, im ); +console.log( z.toString() ); // => '7 + 0i' ``` diff --git a/lib/node_modules/@stdlib/complex/base/wrap-function/docs/repl.txt b/lib/node_modules/@stdlib/complex/base/wrap-function/docs/repl.txt index 5aa9bc6f4c6e..e253d77a156e 100644 --- a/lib/node_modules/@stdlib/complex/base/wrap-function/docs/repl.txt +++ b/lib/node_modules/@stdlib/complex/base/wrap-function/docs/repl.txt @@ -36,11 +36,7 @@ -------- > var f = {{alias}}( {{alias:@stdlib/complex/float32/base/add}}, 2, {{alias:@stdlib/complex/float32/ctor}} ); > var z = f( 3.0, 4.0 ) - - > var re = {{alias:@stdlib/complex/float32/real}}( z ) - 7.0 - > var im = {{alias:@stdlib/complex/float32/imag}}( z ) - 0.0 + [ 7.0, 0.0 ] See Also -------- diff --git a/lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts b/lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts index aea6b8aeaf36..242e22705ba9 100644 --- a/lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/complex/base/wrap-function/docs/types/index.d.ts @@ -193,13 +193,7 @@ type Constructor = new( re: number, im: number ) => ComplexLike; * // ... * * var z = f(); -* // returns -* -* var re = realf( z ); -* // returns -* -* var im = imagf( z ); -* // returns +* // e.g., returns [ , ] */ declare function wrap( fcn: Nullary, nargs: 0, ctor: Constructor ): Nullary; @@ -220,21 +214,13 @@ declare function wrap( fcn: Nullary, nargs: 0, ctor: Constructor ): Nullary; * @example * var Complex64 = require( '@stdlib/complex/float32/ctor' ); * var cidentityf = require( '@stdlib/complex/float32/base/identity' ); -* var realf = require( '@stdlib/complex/float32/real' ); -* var imagf = require( '@stdlib/complex/float32/imag' ); * * var f = wrap( cidentityf, 1, Complex64 ); * * // ... * * var z = f( 3.0 ); -* // returns -* -* var re = realf( z ); -* // returns 3.0 -* -* var im = imagf( z ); -* // returns 0.0 +* // returns [ 3.0, 0.0 ] */ declare function wrap( fcn: Unary, nargs: 1, ctor: Constructor ): WrappedUnary; @@ -255,21 +241,13 @@ declare function wrap( fcn: Unary, nargs: 1, ctor: Constructor ): WrappedUnary; * @example * var Complex64 = require( '@stdlib/complex/float32/ctor' ); * var caddf = require( '@stdlib/complex/float32/base/add' ); -* var realf = require( '@stdlib/complex/float32/real' ); -* var imagf = require( '@stdlib/complex/float32/imag' ); * * var f = wrap( caddf, 2, Complex64 ); * * // ... * * var z = f( 3.0, 4.0 ); -* // returns -* -* var re = realf( z ); -* // returns 7.0 -* -* var im = imagf( z ); -* // returns 0.0 +* // returns [ 7.0, 0.0 ] */ declare function wrap( fcn: Binary, nargs: 2, ctor: Constructor ): WrappedBinary; diff --git a/lib/node_modules/@stdlib/complex/base/wrap-function/examples/index.js b/lib/node_modules/@stdlib/complex/base/wrap-function/examples/index.js index f617d6dc1e83..14c876cc9eda 100644 --- a/lib/node_modules/@stdlib/complex/base/wrap-function/examples/index.js +++ b/lib/node_modules/@stdlib/complex/base/wrap-function/examples/index.js @@ -20,8 +20,6 @@ var Complex64 = require( '@stdlib/complex/float32/ctor' ); var caddf = require( '@stdlib/complex/float32/base/add' ); -var realf = require( '@stdlib/complex/float32/real' ); -var imagf = require( '@stdlib/complex/float32/imag' ); var wrap = require( './../lib' ); var f = wrap( caddf, 2, Complex64 ); @@ -29,13 +27,7 @@ var f = wrap( caddf, 2, Complex64 ); // ... var z = f( 3.0, 4.0 ); -// returns +// returns [ 7.0, 0.0 ] -var re = realf( z ); -// returns 7.0 - -var im = imagf( z ); -// returns 0.0 - -console.log( '%d + %di', re, im ); +console.log( z.toString() ); // => '7 + 0i' diff --git a/lib/node_modules/@stdlib/complex/base/wrap-function/lib/index.js b/lib/node_modules/@stdlib/complex/base/wrap-function/lib/index.js index 6f0897d58da2..30ec7116b360 100644 --- a/lib/node_modules/@stdlib/complex/base/wrap-function/lib/index.js +++ b/lib/node_modules/@stdlib/complex/base/wrap-function/lib/index.js @@ -26,8 +26,6 @@ * @example * var Complex64 = require( '@stdlib/complex/float32/ctor' ); * var caddf = require( '@stdlib/complex/float32/base/add' ); -* var realf = require( '@stdlib/complex/float32/real' ); -* var imagf = require( '@stdlib/complex/float32/imag' ); * var wrap = require( '@stdlib/complex/base/wrap-function' ); * * var f = wrap( caddf, 2, Complex64 ); @@ -35,13 +33,7 @@ * // ... * * var z = f( 3.0, 4.0 ); -* // returns -* -* var re = realf( z ); -* // returns 7.0 -* -* var im = imagf( z ); -* // returns 0.0 +* // returns [ 7.0, 0.0 ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/complex/base/wrap-function/lib/main.js b/lib/node_modules/@stdlib/complex/base/wrap-function/lib/main.js index fc05df8724ad..b380d1dd0f06 100644 --- a/lib/node_modules/@stdlib/complex/base/wrap-function/lib/main.js +++ b/lib/node_modules/@stdlib/complex/base/wrap-function/lib/main.js @@ -53,21 +53,13 @@ var T = 'number'; * @example * var Complex64 = require( '@stdlib/complex/float32/ctor' ); * var caddf = require( '@stdlib/complex/float32/base/add' ); -* var realf = require( '@stdlib/complex/float32/real' ); -* var imagf = require( '@stdlib/complex/float32/imag' ); * * var f = wrap( caddf, 2, Complex64 ); * * // ... * * var z = f( 3.0, 4.0 ); -* // returns -* -* var re = realf( z ); -* // returns 7.0 -* -* var im = imagf( z ); -* // returns 0.0 +* // returns [ 7.0, 0.0 ] */ function wrap( fcn, nargs, ctor ) { var fcns;