Closed DimaKoltun closed 7 months ago
Any integer larger than +/-16777216 cannot be reliably represented as a floating point value.
e.g. https://www.omnicalculator.com/other/floating-point
9999999 is ok 99999999 will be stored as 100000000 999999999 will be stored as 1000000000 9999999999 will be stored as 10000000000 99999999999 will be stored as 99999997952 999999999999 will be stored as 999999995904 etc.
If you need greater precision you may want to use a double
with DragScalar()
, or an integer.
Version/Branch of Dear ImGui:
Version 1.89, Branch: docking
Back-ends:
imgui_impl_sdl.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
Windows 10 + MSVC 2022
Full config/build information:
Details:
My Issue/Question:
When i set large value in DragFloat with limits due ctrl+click then incorrect value is set.
Screenshots/Video:
Minimal, Complete and Verifiable Example code: