Prism · Math
$mod
The remainder of the first number divided by the second. It takes the sign of the second, so with a positive divisor it is never negative. Dividing by zero refuses with E_DIVISION_BY_ZERO.
{ row: 7, behind: -1 }{
stripe: { $mod: [{ $ref: '$.row' }, 2] },
slot: { $mod: [{ $ref: '$.behind' }, 5] },
}{ stripe: 1, slot: 4 }Runs in this page on the installed package. The input and the expected output are defined by the example.