petite-utils • Docs
函数: modulo() 
modulo(
m,n):number
m mod n, it is different from % operator in javascript % operator is remainder operator, m % n is same to m - n * Math.trunc(m / n). Modulo operator is m mod n is same to m - n * Math.floor(m / n) https://www.designcise.com/web/tutorial/what-is-the-difference-between-the-javascript-remainder-operator-and-the-modulo-operator
参数 
| 参数名 | 类型 | 描述 | 
|---|---|---|
m | number | |
n | number | 
返回值 
number
示例 
ts
modulo(7, 3) // 1
modulo(-7, -3) // -1
modulo(7, -3) // -2
modulo(-7, 3) // 2