Fix T42222
authorAntony Riakiotakis <kalast@gmail.com>
Thu, 16 Oct 2014 10:04:25 +0000 (12:04 +0200)
committerAntony Riakiotakis <kalast@gmail.com>
Thu, 16 Oct 2014 10:04:41 +0000 (12:04 +0200)
Avoid using roundf function, since it's oly defined in C99

source/blender/editors/interface/view2d_ops.c

index 2b84c0678ae3f309f70cd6d4cddc8a7729d75649..a396893f8f20c84c45a9501c5f18abeeae9809d7 100644 (file)
@@ -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) {