diff options
Diffstat (limited to 'src/math/color.cc')
-rw-r--r-- | src/math/color.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/math/color.cc b/src/math/color.cc index 05f3b4c..ecdfd2f 100644 --- a/src/math/color.cc +++ b/src/math/color.cc @@ -10,13 +10,15 @@ namespace math { -Color::Color() +Color::Color() : + r(_r), g(_g), b(_b), a(_a) { _r = _g = _b = 0.0f; _a = 1.0f; } -Color::Color(const float red, const float green , const float blue , const float alpha) +Color::Color(const float red, const float green , const float blue , const float alpha) : + r(_r), g(_g), b(_b), a(_a) { _r = red; _g = green; @@ -24,13 +26,15 @@ Color::Color(const float red, const float green , const float blue , const float _a = alpha; } -Color::Color(const float grey, const float alpha) +Color::Color(const float grey, const float alpha) : + r(_r), g(_g), b(_b), a(_a) { _r = _g = _b = grey; _a = alpha; } -Color::Color(const Color &other) +Color::Color(const Color &other) : + r(_r), g(_g), b(_b), a(_a) { this->operator=(other); } |