maskData comes out of maskCtx.getImageData, so is 0..255 clamped, and the used multiplications will not create fractions needing rounding, neither would addition.
maskData comes out of maskCtx.getImageData, so is 0..255 clamped, and the used multiplications will not create fractions needing rounding, neither would addition.