5 ms·
In JavaScript, I’d stay with floating-point (don’t fight the language if you don’t have to) and use something like x => x - Math.floor(x) to normalize.
by codeflo 4y ago
In JavaScript, I’d stay with floating-point (don’t fight the language if you don’t have to) and use something like x => x - Math.floor(x) to normalize.