diff --git a/lib/node_modules/@stdlib/array/complex64/README.md b/lib/node_modules/@stdlib/array/complex64/README.md index 338d8b40f132..17e31bfcc2ee 100644 --- a/lib/node_modules/@stdlib/array/complex64/README.md +++ b/lib/node_modules/@stdlib/array/complex64/README.md @@ -798,6 +798,11 @@ var bool = it.next().done; // returns true ``` +The returned [iterator][mdn-iterator-protocol] protocol-compliant object has the following properties: + +- **next**: function which returns an [iterator][mdn-iterator-protocol] protocol-compliant object containing the next iterated value (if one exists) assigned to a `value` property and a `done` property having a `boolean` value indicating whether the [iterator][mdn-iterator-protocol] is finished. +- **return**: function which closes an [iterator][mdn-iterator-protocol] and returns a single (optional) argument in an [iterator][mdn-iterator-protocol] protocol-compliant object. + #### Complex64Array.prototype.every( predicate\[, thisArg] ) @@ -2222,9 +2227,52 @@ var str = arr.toString(); // returns '1 + 1i,2 - 2i,3 + 3i' ``` + + +#### Complex64Array.prototype.values() + +Returns an iterator for iterating over each value in a typed array. + +```javascript +var realf = require( '@stdlib/complex/realf' ); +var imagf = require( '@stdlib/complex/imagf' ); +var arr = new Complex64Array( 2 ); + +arr.set( [ 1.0, -1.0 ], 0 ); +arr.set( [ 2.0, -2.0 ], 1 ); + +var iter = arr.values(); + +var v = iter.next().value; +// returns + +var re = realf( v ); +// returns 1.0 + +var im = imagf( v ); +// returns -1.0 + +v = iter.next().value; +// returns + +re = realf( v ); +// returns 2.0 + +im = imagf( v ); +// returns -2.0 + +var bool = iter.next().done; +// returns true +``` + +The returned [iterator][mdn-iterator-protocol] protocol-compliant object has the following properties: + +- **next**: function which returns an [iterator][mdn-iterator-protocol] protocol-compliant object containing the next iterated value (if one exists) assigned to a `value` property and a `done` property having a `boolean` value indicating whether the [iterator][mdn-iterator-protocol] is finished. +- **return**: function which closes an [iterator][mdn-iterator-protocol] and returns a single (optional) argument in an [iterator][mdn-iterator-protocol] protocol-compliant object. + -#### Complex128Array.prototype.with( index, value ) +#### Complex64Array.prototype.with( index, value ) Returns a new typed array with the element at a provided index replaced with a provided value. @@ -2352,6 +2400,8 @@ logEach( '%s', out );