From 0ba3cadb887058ce6b86ce2a9048cf2bb1dc85b0 Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 29 Aug 2017 15:25:05 +0800 Subject: [PATCH] RenderRectFilledRangeH() can't use cheap acosf() approximation for now. (#1296) --- imgui_draw.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 4a090c35..0a23ac0e 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -2337,7 +2337,8 @@ static inline float ImAcos01(float x) { if (x <= 0.0f) return IM_PI * 0.5f; if (x >= 1.0f) return 0.0f; - return (-0.69813170079773212f * x * x - 0.87266462599716477f) * x + 1.5707963267948966f; // Cheap approximation, enough for what we do. + return acosf(x); + //return (-0.69813170079773212f * x * x - 0.87266462599716477f) * x + 1.5707963267948966f; // Cheap approximation, may be enough for what we do. } // FIXME: Cleanup and move code to ImDrawList.