It returns the remainder of an integer division.
Input | Output |
---|---|
{"a":1,"b":1}
|
0
|
{"a":2,"b":5}
|
2
|
{"a":8,"b":3}
|
2
|
It can even cope with floats.
Input | Output |
---|---|
{"a":3.5,"b":2.1}
|
1.4
|
{"a":-18.25,"b":9}
|
-0.25
|
{"a":-182.7,"b":-39.3}
|
-25.5
|
It can also process negative integers.
Input | Output |
---|---|
{"a":-2,"b":5}
|
-2
|
{"a":2,"b":-5}
|
2
|
{"a":-2,"b":-5}
|
-2
|