Add operator overloads for Colors and floats
This commit is contained in:
parent
d9a8920cdf
commit
da87ac8dd2
2 changed files with 97 additions and 12 deletions
12
src/basics.h
12
src/basics.h
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue