[Bf-blender-cvs] [dc6fcb8ecff] master: UI/floats: Reduce our UI_PRECISION_FLOAT_MAX by one to avoid most rounding issues.
Bastien Montagne
noreply at git.blender.org
Fri Jul 21 10:12:45 CEST 2017
Commit: dc6fcb8ecff41e61fbf31462b068b2ec790760d4
Author: Bastien Montagne
Date: Fri Jul 21 10:10:36 2017 +0200
Branches: master
https://developer.blender.org/rBdc6fcb8ecff41e61fbf31462b068b2ec790760d4
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.
===================================================================
M source/blender/editors/include/UI_interface.h
===================================================================
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
More information about the Bf-blender-cvs
mailing list