Calculate the modulo for positive or negative numbers.
import { mod } from 'mz-math'; const res1 = mod(-21, 4); // 3 const res2 = mod(7, 3); // 1