ImSwap() helper.

This commit is contained in:
omar
2017-08-28 19:27:12 +08:00
parent 808d631e35
commit 7a9ea281be
2 changed files with 3 additions and 2 deletions

View File

@ -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;
}