Make Gradient constructor using doubles instead of floats, to prevent narrowing-conversion warnings down the road

This commit is contained in:
vsonnier 2020-01-04 21:20:36 +01:00
parent 45fe1a9f3b
commit 9c32b97910

View File

@ -10,8 +10,9 @@ public:
float r, g, b; float r, g, b;
float w; float w;
GradientColor(float r_in, float g_in, float b_in) : //should work with both float and double inputs
r(r_in), g(g_in), b(b_in), w(1) { GradientColor(double r_in, double g_in, double b_in) :
r((float)r_in), g((float)g_in), b((float)b_in), w(1) {
} }
}; };