diff options
author | rtk0c <[email protected]> | 2021-05-14 20:52:00 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-05-14 20:52:00 -0700 |
commit | fa13cad2bf12d8f7f63f7ff6aab07dd2eaf6ec6d (patch) | |
tree | 994198f3636030b3974f73170fc59b04a794681d /core/src/Utils | |
parent | 765df313e065f8401319c68ba70cd41b0bc34c9d (diff) |
Node graph editor basic functionality
Diffstat (limited to 'core/src/Utils')
-rw-r--r-- | core/src/Utils/Color.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/Utils/Color.hpp b/core/src/Utils/Color.hpp index 26cfdd4..5f4691f 100644 --- a/core/src/Utils/Color.hpp +++ b/core/src/Utils/Color.hpp @@ -164,8 +164,8 @@ constexpr HsvColor RgbaColor::ToHsv() const noexcept float fb = GetNormalizedGreen();
float fa = GetNormalizedAlpha();
- auto p = fg < fb ? ImVec4(fb, fg, -1, 2.0f / 3.0f) : ImVec4(fg, fb, 0, -1.0f / 3.0f);
- auto q = fr < p.x ? ImVec4(p.x, p.y, p.w, fr) : ImVec4(fr, p.y, p.z, p.x);
+ auto p = fg < fb ? Vec4f{ fb, fg, -1, 2.0f / 3.0f } : Vec4f{ fg, fb, 0, -1.0f / 3.0f };
+ auto q = fr < p.x ? Vec4f{ p.x, p.y, p.w, fr } : Vec4f{ fr, p.y, p.z, p.x };
float c = q.x - std::min(q.w, q.y);
float h = std::abs((q.w - q.y) / (6 * c + std::numeric_limits<float>::epsilon()) + q.z);
|