UNPKG

@stdlib/ndarray-base-wrap-index

Version:

Wrap an index on the interval [0,max].

6 lines (5 loc) 330 B
"use strict";var f=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var u=f(function(o,n){ function s(r,e){var t=e+1;return r<0?(r+=t,r<0&&(r%=t,r!==0&&(r+=t)),r):(r>e&&(r-=t,r>e&&(r%=t)),r)}n.exports=s });var p=u();module.exports=p; /** @license Apache-2.0 */ //# sourceMappingURL=index.js.map