[core] round color string's alpha to 2 decimal places

This commit is contained in:
Łukasz Paczos
2019-03-27 12:39:16 +01:00
committed by Łukasz Paczos
parent b21f9f3e35
commit 37d9dfae69

View File

@@ -39,7 +39,7 @@ std::array<double, 4> Color::toArray() const {
r * 255 / a,
g * 255 / a,
b * 255 / a,
a,
floor(a * 100 + .5) / 100 // round to 2 decimal places
}};
}
}