add ship
This commit is contained in:
@@ -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); }
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user