This commit is contained in:
h4570
2022-08-14 19:41:44 +02:00
parent b8aa40cba8
commit a78f430a6e
8 changed files with 132 additions and 19 deletions
+2
View File
@@ -49,6 +49,8 @@ class Color {
explicit Color(const float* v) { copy(this, v); }
void operator=(const Color& v);
void operator*=(const float& v);
void operator/=(const float& v);
inline void set(const Color& v) { copy(this, v.rgba); }
inline void set(const float* v) { copy(this, v); }
+12
View File
@@ -19,6 +19,18 @@ void Color::copy(Color* out, const float* in) {
}
void Color::operator=(const Color& v) { copy(this, v); }
void Color::operator*=(const float& v) {
r *= v;
g *= v;
b *= v;
a *= v;
}
void Color::operator/=(const float& v) {
r /= v;
g /= v;
b /= v;
a /= v;
}
void Color::set(const float& t_r, const float& t_g, const float& t_b,
const float& t_a) {