Color::FromUInt: Divide by float to avoid rounding issues.
This commit is contained in:
parent
ecb888f941
commit
16da4de876
@ -66,10 +66,10 @@ Vector3 Color::ToHSV() const
|
||||
|
||||
void Color::FromUInt(unsigned color)
|
||||
{
|
||||
a_ = (float)(((color >> 24) & 0xff) / 255);
|
||||
b_ = (float)(((color >> 16) & 0xff) / 255);
|
||||
g_ = (float)(((color >> 8) & 0xff) / 255);
|
||||
r_ = (float)(((color >> 0) & 0xff) / 255);
|
||||
a_ = (float)(((color >> 24) & 0xff) / 255.0f);
|
||||
b_ = (float)(((color >> 16) & 0xff) / 255.0f);
|
||||
g_ = (float)(((color >> 8) & 0xff) / 255.0f);
|
||||
r_ = (float)(((color >> 0) & 0xff) / 255.0f);
|
||||
}
|
||||
|
||||
void Color::FromHSL(float h, float s, float l, float a)
|
||||
|
Loading…
Reference in New Issue
Block a user