mod static method

num mod(
  1. num x,
  2. num m
)

Returns the non-negative remainder of x / m.

x The operand.

m The modulus.

Implementation

static num mod(num x, num m) => ((x % m) + m) % m;