mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
ImSwap() helper.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user