mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-22 01:54:21 +00:00
ImSwap() helper.
This commit is contained in:
parent
808d631e35
commit
7a9ea281be
2 changed files with 3 additions and 2 deletions
|
|
@ -1252,12 +1252,12 @@ void ImGui::ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float&
|
|||
float K = 0.f;
|
||||
if (g < b)
|
||||
{
|
||||
const float tmp = g; g = b; b = tmp;
|
||||
ImSwap(g, b);
|
||||
K = -1.f;
|
||||
}
|
||||
if (r < g)
|
||||
{
|
||||
const float tmp = r; r = g; g = tmp;
|
||||
ImSwap(r, g);
|
||||
K = -2.f / 6.f - K;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue