This is the formula given for padding in PSET5 from WEEK7 :
int padding = (4 - (bi.biWidth * sizeof(RGBTRIPLE)) % 4) % 4;
I don't understand what the outermost %4
is meant for. It seems redundant to me. Someone please explain the function of this outermost %4
.