From dc6fcb8ecff41e61fbf31462b068b2ec790760d4 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 21 Jul 2017 10:10:36 +0200 Subject: [PATCH] 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. --- source/blender/editors/include/UI_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 252c199d46c..7b4fac08a7b 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -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