I found this line of code: this.red = (float)(par4 >> 16 & 255) / 255.0F;
where red has been declared as a float
.
I am trying to understand what it does, especially because the full code is:
this.red = (float)(par4 >> 16 & 255) / 255.0F;
this.blue = (float)(par4 >> 8 & 255) / 255.0F;
this.green = (float)(par4 & 255) / 255.0F;
this.alpha = (float)(par4 >> 24 & 255) / 255.0F;
GL11.glColor4f(this.red, this.blue, this.green, this.alpha);
so I'm guessing this somehow uses different locations of an int (par4
) to color text. par4
is equal to 553648127
in this case.
What do those four lines mean, notably the >> 16 & 25
?