I came across the following line
hsb.s = max != 0 ? 255 * delta / max : 0;
What do the ? and : mean in this conte
?
:
?: is a short-hand condition for else {} and if(){} problems. So your code is interchangeable to this:
else {}
if(){}
if(max != 0){ hsb.s = 225 * delta / max } else { hsb.s = 0 }
MDN - Conditional (Ternary) Operator