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.

The source
{ row: 7, behind: -1 }
The config
{
  stripe: { $mod: [{ $ref: '$.row' }, 2] },
  slot: { $mod: [{ $ref: '$.behind' }, 5] },
}
What comes out
{ stripe: 1, slot: 4 }
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.