time-to-botec/squiggle/node_modules/@stdlib/ndarray/base/wrap-index/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

30 lines
424 B
Plaintext

{{alias}}( idx, max )
Wraps an index on the interval `[0,max]`.
Parameters
----------
idx: integer
Index to wrap.
max: integer
Maximum index value.
Returns
-------
out: integer
Wrapped index.
Examples
--------
> var idx = {{alias}}( 2, 10 )
2
> idx = {{alias}}( -4, 10 )
7
> idx = {{alias}}( 13, 10 )
2
See Also
--------