diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-21 01:06:21 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-21 01:06:21 +0200 |
commit | 9a0d8a428b21a77272380009d97436b0a5f20d8c (patch) | |
tree | 55dbb556286db2f545dea92e5d555e5167153709 /main | |
parent | c6ab4f8b8fafe13207794a0debe1a374960e0d6b (diff) |
fix typo
Diffstat (limited to 'main')
-rw-r--r-- | main/imgui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/imgui.cpp b/main/imgui.cpp index c4c0cd2c..0a90a3a1 100644 --- a/main/imgui.cpp +++ b/main/imgui.cpp @@ -156,7 +156,7 @@ void app::draw_fps() auto c6 = push_style_color(ImGuiCol_Text, {0, 1, 0, 1}); char buf[16]; - const double hz = _frame_time > 1e-6f ? std::round(1/double(_frame_time)*10.)*.1 + 0.02 : 9999; + const double hz = _frame_time > 1e-6f ? (int)std::round(10./(double)_frame_time + .05) * .1 : 9999; snprintf(buf, sizeof(buf), "%.1f FPS", hz); const ImVec2 size = ImGui::CalcTextSize(buf); |