Modulo algorithm in JavaScript
http://horsey_guy.codeberg.page/modulo_algorithm
| .gitignore | Boom | |
| alternative.html | Boom | |
| index.html | Boom | |
| LICENSE | Boom | |
| README.md | Boom | |
Simple modulo algorithm
Written in JavaScript for the web
There are two simple algorithms.
One calculates the largest multiple of b smaller than a and subtracts b from a. (typical method)
There's another which simply subtracts b from a until a is greater than or equal to b. (easy method)
Both handle negative a values.
License
Licensed under the EUPL v1.2