Color::get_{r,g,b,a}8()
use truncate instead of round
#47022
Labels
Milestone
Color::get_{r,g,b,a}8()
use truncate instead of round
#47022
Godot version:
3.2.4-rc4, 4.0-dev
OS/device including version:
Kubuntu 20.10
Issue description:
These methods use truncate instead of round, which causes inconsistencies with
to_html
in some cases (see example below). Here are the code sections responsible for this:godot/core/math/color.h
Lines 199 to 206 in 6eef187
godot/core/math/color.cpp
Lines 421 to 441 in 6eef187
Steps to reproduce:
Minimal reproduction project:
—
The text was updated successfully, but these errors were encountered: