Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] round color string's alpha to 2 decimal places
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasPaczos committed Mar 27, 2019
1 parent 48ad3cf commit 1907c05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mbgl/util/color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}};
}
}
Expand Down

0 comments on commit 1907c05

Please sign in to comment.