mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-01 13:44:21 +00:00
PixelPaint: Fix broken "Color Masking" selection
This change solves a problem where the color selection via mouse click on the color wheel was computing a wrong hue angle.
This commit is contained in:
parent
bb0bfb7944
commit
490d61d694
|
@ -437,8 +437,8 @@ double ColorWheelWidget::hue()
|
|||
void ColorWheelWidget::calc_hue(Gfx::IntPoint const& position)
|
||||
{
|
||||
auto center = Gfx::IntPoint(width() / 2, height() / 2);
|
||||
auto angle = AK::to_degrees(AK::atan2(static_cast<float>(position.y() - center.y()), static_cast<float>(position.x() - center.x())));
|
||||
|
||||
auto angle = AK::atan2(static_cast<float>(position.y() - center.y()), AK::to_degrees(static_cast<float>(position.x() - center.x())));
|
||||
set_hue(angle + 90);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue