Skip to content

Commit

Permalink
RenderRectFilledRangeH() can't use cheap acosf() approximation for no…
Browse files Browse the repository at this point in the history
…w. (#1296)
  • Loading branch information
ocornut committed Aug 29, 2017
1 parent f8eef49 commit 0ba3cad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imgui_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0ba3cad

Please sign in to comment.