Skip to content

Commit 63c213a

Browse files
committed
docs: add documentation for toReverse method in array/fixed-endian-factory
1 parent ad78b72 commit 63c213a

File tree

1 file changed

+25
-0
lines changed
  • lib/node_modules/@stdlib/array/fixed-endian-factory

1 file changed

+25
-0
lines changed

lib/node_modules/@stdlib/array/fixed-endian-factory/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,31 @@ var count = context.count;
679679
// returns 3
680680
```
681681

682+
<a name="method-to-reversed"></a>
683+
684+
#### TypedArray.prototype.toReversed()
685+
686+
Returns a new typed array containing the elements in reversed order.
687+
688+
```javascript
689+
var Float64ArrayFE = fixedEndianFactory( 'float64' );
690+
691+
var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0 ] );
692+
// returns <Float64ArrayFE>
693+
694+
var out = arr.toReversed();
695+
// returns <Float64ArrayFE>
696+
697+
var v = out.get( 0 );
698+
// returns 3.0
699+
700+
v = out.get( 1 );
701+
// returns 2.0
702+
703+
v = out.get( 2 );
704+
// returns 1.0
705+
```
706+
682707
<a name="method-to-string"></a>
683708

684709
#### TypedArrayFE.prototype.toString()

0 commit comments

Comments
 (0)