[Bf-blender-cvs] [507712d] master: Fix T42222

Antony Riakiotakis noreply at git.blender.org
Thu Oct 16 12:04:49 CEST 2014


Commit: 507712db3fd7aa7bb903f6860f5a4eb29aa2be02
Author: Antony Riakiotakis
Date:   Thu Oct 16 12:04:25 2014 +0200
Branches: master
https://developer.blender.org/rB507712db3fd7aa7bb903f6860f5a4eb29aa2be02

Fix T42222

Avoid using roundf function, since it's oly defined in C99

===================================================================

M	source/blender/editors/interface/view2d_ops.c

===================================================================

diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 2b84c06..a396893 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1726,7 +1726,7 @@ static void scroller_activate_apply(bContext *C, wmOperator *op)
 	temp = vsm->fac * vsm->delta;
 
 	/* round to pixel */
-	temp = roundf(temp / vsm->fac_round) * vsm->fac_round;
+	temp = floorf(temp / vsm->fac_round + 0.5f) * vsm->fac_round;
 	
 	/* type of movement */
 	switch (vsm->zone) {




More information about the Bf-blender-cvs mailing list