Add operator overloads for Colors and floats

This commit is contained in:
Eryn Wells 2013-09-12 15:51:08 -07:00
parent d9a8920cdf
commit da87ac8dd2
2 changed files with 97 additions and 12 deletions

View file

@ -57,8 +57,16 @@ struct Color
Color();
Color(float r, float g, float b, float a);
Color &operator=(const Color &c);
Color &operator*=(const float c);
Color &operator*=(const float &rhs);
Color &operator/=(const float &rhs);
Color &operator+=(const float &rhs);
Color &operator-=(const float &rhs);
Color operator*(const float &rhs) const;
Color operator/(const float &rhs) const;
Color operator+(const float &rhs) const;
Color operator-(const float &rhs) const;
Color &operator=(const Color &rhs);
static const Color Black;
static const Color White;