MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / InputFloat

Method InputFloat

examples/ThirdPartyLibs/imgui/imgui.cpp:10785–10793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10783}
10784
10785bool ImGui::InputFloat(const char* label, float* v, float step, float step_fast, int decimal_precision, ImGuiInputTextFlags extra_flags)
10786{
10787 char display_format[16];
10788 if (decimal_precision < 0)
10789 strcpy(display_format, "%f"); // Ideally we'd have a minimum decimal precision of 1 to visually denote that this is a float, while hiding non-significant digits? %f doesn't have a minimum of 1
10790 else
10791 ImFormatString(display_format, IM_ARRAYSIZE(display_format), "%%.%df", decimal_precision);
10792 return InputScalarEx(label, ImGuiDataType_Float, (void*)v, (void*)(step > 0.0f ? &step : NULL), (void*)(step_fast > 0.0f ? &step_fast : NULL), display_format, extra_flags);
10793}
10794
10795bool ImGui::InputInt(const char* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags)
10796{

Callers

nothing calls this directly

Calls 1

ImFormatStringFunction · 0.85

Tested by

no test coverage detected