+ 1

Understanding js line R = 255 * (R <= 0 ? 0 : R>= 1 ? 1 : Math.pow(R, 1 / gC));

Can you please explain me the meaning of this line : R = 255 * (R <= 0 ? 0 : R>= 1 ? 1 : Math.pow(R, 1 / gC)); . ? Am I right?? thank you P if R <=0 then R =255*0 Else If R>=1 then R=255*1 Else R =255* (R^1/gC)

11th Oct 2018, 7:16 PM
Anastasia G
Anastasia G - avatar
1 Resposta
+ 1
Yes, though R^(1/gC) should be used to show that is processed first.
11th Oct 2018, 10:27 PM
John Wells
John Wells - avatar