Modulo with result in range
[y] = CL_rMod(x, a, b) [y] = CL_rMod(x, a)
Computes a modulo in a given range.
The result y is such that y = x modulo [b-a] with y in [a,b[. That is to say that y = x + k*(b-a) with k integer such that y belongs to [a, b[.
Notes:
- x can be a row or a column vector, a and b can be scalars or vectors with same sizes as x.
- CL_rMod(x, a) is the same as CL_rMod(x, 0, a)
- CL_rMod([], a, b) = []
Vector of real values (1xN or Nx1)
Minimum value (1x1) or same dimension as x
Maximum value (strictly greater than a) (1x1 or same size as a)
Result of "x modulo (b-a)" belonging to [a,b[ (same size as x)
CNES - DCT/SB