a mod b
a mod b returns the signed remainder after division:
a mod b = a - trunc(a / b) *b
a |
b |
a mod b |
10 |
5 |
0 |
9.9 |
5 |
4.9 |
-8 |
2 |
0 |
-7.9 |
2 |
-1.9 |
-7.9 |
-2 |
-1.9 |
a and b must be scalars.