I came across the following line
hsb.s = max != 0 ? 255 * delta / max : 0;
What do the ?
and :
mean in this conte
This is probably a bit clearer when written with brackets as follows:
hsb.s = (max != 0) ? (255 * delta / max) : 0;
What it does is evaluate the part in the first brackets. If the result is true then the part after the ? and before the : is returned. If it is false, then what follows the : is returned.