diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-01-05 19:25:45 +0100 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-01-05 19:25:45 +0100 |
| commit | 96198dae55b1429449504e49065a10763b288431 (patch) | |
| tree | ee18d707952df6fcbd4f9295e138d1571b64267b /src/helpers/Color.hpp | |
| parent | 0e3547e0f6b4016aa308292a86c43cd47dd206fd (diff) | |
Normalize color storage
Colors are now normalized to 0 - 1 values instead of 0 - 255
causes calculations to be simpler and generally cleans up the codebase.
Diffstat (limited to 'src/helpers/Color.hpp')
| -rw-r--r-- | src/helpers/Color.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/Color.hpp b/src/helpers/Color.hpp index d3cae689..184087ac 100644 --- a/src/helpers/Color.hpp +++ b/src/helpers/Color.hpp @@ -8,12 +8,12 @@ class CColor { CColor(float, float, float, float); CColor(uint64_t); - float r = 0, g = 0, b = 0, a = 255; + float r = 0, g = 0, b = 0, a = 1.f; uint64_t getAsHex(); CColor operator-(const CColor& c2) const { - return CColor(r - c2.r, g - c2.g, b - c2.b, a - c2.a); + return CColor(r - c2.r, g - c2.g, b - c2.b, a - c2.a); } CColor operator+(const CColor& c2) const { |
