mod static method

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

Returns the non-negative remainder of x / m.

x The operand.

m The modulus.

Implementation

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