From 033de13fa0a81be466666ed0d0080b1c2221baec Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 5 Jan 2014 13:46:14 +0200 Subject: [PATCH] Fix component handling error in Color --- source/color.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/color.h b/source/color.h index 7de2eedf..c45751d0 100644 --- a/source/color.h +++ b/source/color.h @@ -13,8 +13,8 @@ struct Color Color(float r_, float g_, float b_): r(r_), g(g_), b(b_), a(1) { } Color(float r_, float g_, float b_, float a_): r(r_), g(g_), b(b_), a(a_) { } Color operator*(float f) const { return Color(r*f, g*f, b*f, a); } - Color operator+(const Color &c) const { return Color(r+c.r, g+c.g, b+c.g, 1-(1-a)*(1-c.a)); } - bool operator==(const Color &c) const { return (r==c.r && b==c.b && g==c.g && a==c.a); } + Color operator+(const Color &c) const { return Color(r+c.r, g+c.g, b+c.b, 1-(1-a)*(1-c.a)); } + bool operator==(const Color &c) const { return (r==c.r && g==c.g && b==c.b && a==c.a); } bool operator!=(const Color &c) const { return !operator==(c); } }; -- 2.45.2