2 ms·
For overflowing integers in JS, you can use single-value long typed arrays. I just checked with an Uint16Array and it wraps back to 0 after 65536.
by Klaster_1 4y ago
For overflowing integers in JS, you can use single-value long typed arrays. I just checked with an Uint16Array and it wraps back to 0 after 65536.
- flowerbreeze 4y agoThank you! This works great as well for my purposes: > a = new Uint16Array(1) Uint16Array(1) [ 0 ] > a[0] 0 > a[0] = a[0] + 65537 65537 > a[0] 1