UI/floats: Reduce our UI_PRECISION_FLOAT_MAX by one to avoid most rounding issues.

The way we use it, UI_PRECISION_FLOAT_MAX is actually + 1 to get total
number of digits, and float only has 7 meaningful digits, so that define
shall be at 6.
This commit is contained in:
Bastien Montagne 2017-07-21 10:10:36 +02:00
parent db8bc1d982
commit dc6fcb8ecf
1 changed files with 1 additions and 1 deletions

View File

@ -1082,7 +1082,7 @@ void UI_butstore_unregister(uiButStore *bs_handle, uiBut **but_p);
/* Float precision helpers */
#define UI_PRECISION_FLOAT_MAX 7
#define UI_PRECISION_FLOAT_MAX 6
/* For float buttons the 'step' (or a1), is scaled */
#define UI_PRECISION_FLOAT_SCALE 0.01f