diff --git a/Base/src/Color.cpp b/Base/src/Color.cpp index 386b33a..a046f58 100644 --- a/Base/src/Color.cpp +++ b/Base/src/Color.cpp @@ -56,13 +56,13 @@ namespace FasTC { uint32 Color::Pack() const { uint32 result = 0; - result = static_cast((A() + 0.5f) * 255.0f); + result |= static_cast((A() * 255.0f) + 0.5f); result <<= 8; - result = static_cast((B() + 0.5f) * 255.0f); + result |= static_cast((B() * 255.0f) + 0.5f); result <<= 8; - result = static_cast((G() + 0.5f) * 255.0f); + result |= static_cast((G() * 255.0f) + 0.5f); result <<= 8; - result = static_cast((R() + 0.5f) * 255.0f); + result |= static_cast((R() * 255.0f) + 0.5f); return result; }