diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-27 18:59:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-27 18:59:55 +0400 |
commit | 617e6a83bc89ca36e18bd06d851a31c010e11db2 (patch) | |
tree | d1347daa3d9a7bf51a0168048247cfe1ce13a4ee /source/blender/editors/gpencil/drawgpencil.c | |
parent | 8d7c3f8a7e6de7625b3631cd91242fbefa98cf3a (diff) |
object/paint/misc-files: floats were being implicitly promoted to doubles, adjust to use floats.
- also UV angle stretching was using radians->deg which wasn't needed.
Diffstat (limited to 'source/blender/editors/gpencil/drawgpencil.c')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index ffaedf6a5bc..8d41ed5fec1 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -123,7 +123,7 @@ static void gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thick /* if there was a significant pressure change, stop the curve, change the thickness of the stroke, * and continue drawing again (since line-width cannot change in middle of GL_LINE_STRIP) */ - if (fabs(pt->pressure - oldpressure) > 0.2f) { + if (fabsf(pt->pressure - oldpressure) > 0.2f) { glEnd(); glLineWidth(pt->pressure * thickness); glBegin(GL_LINE_STRIP); @@ -217,7 +217,7 @@ static void gp_draw_stroke_3d (bGPDspoint *points, int totpoints, short thicknes /* if there was a significant pressure change, stop the curve, change the thickness of the stroke, * and continue drawing again (since line-width cannot change in middle of GL_LINE_STRIP) */ - if (fabs(pt->pressure - oldpressure) > 0.2f) { + if (fabsf(pt->pressure - oldpressure) > 0.2f) { glEnd(); glLineWidth(pt->pressure * thickness); glBegin(GL_LINE_STRIP); @@ -384,7 +384,7 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s mt[1]= mb[1] * pthick; athick= len_v2(mt); dfac= pthick - (athick * 2); - if ( ((athick * 2) < pthick) && (IS_EQ(athick, pthick)==0) ) + if ( ((athick * 2.0f) < pthick) && (IS_EQ(athick, pthick)==0) ) { mt[0] += (mb[0] * dfac); mt[1] += (mb[1] * dfac); |