UNPKG

@davidcal/fec-raptorq

Version:

Node.js wrapper for RaptorQ forward error correction

11 lines (9 loc) 212 B
/** * @stability 4 - locked * * Fixes modular arithmetic in JavaScript to always return a positive number. */ export const pos_mod = (a, b) => { return ((a % b) + b) % b; }; export const posMod = pos_mod;