Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-03-31 07:28:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-31 07:28:46 +0400
commite8d532f1dde96c40c1407d39260724fcfee0b606 (patch)
tree36264f1310ab0dd9af959d09373e7ad6a5e13126 /source/blender/editors/sculpt_paint/paint_ops.c
parent2c58e96685e80e4e12dfad56ed3bb51fa3824197 (diff)
style cleanup
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_ops.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 7ea11cc464a..a63d147e459 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -476,7 +476,7 @@ static int stencil_control_invoke(bContext *C, wmOperator *op, const wmEvent *ev
copy_v2_v2_int(scd->init_sdim, br->stencil_dimension);
copy_v2_v2_int(scd->init_spos, br->stencil_pos);
sub_v2_v2v2_int(mdiff, event->mval, br->stencil_pos);
- scd->lenorig = sqrtf(mdiff[0]*mdiff[0] + mdiff[1]*mdiff[1]);
+ scd->lenorig = sqrtf(mdiff[0] * mdiff[0] + mdiff[1] * mdiff[1]);
scd->br = br;
scd->init_rot = br->mtex.rot;
scd->init_angle = atan2(mdiff[1], mdiff[0]);
@@ -519,10 +519,10 @@ static int stencil_control_modal(bContext *C, wmOperator *op, const wmEvent *eve
{
float len, factor;
sub_v2_v2v2_int(mdiff, event->mval, scd->br->stencil_pos);
- len = sqrtf(mdiff[0]*mdiff[0] + mdiff[1]*mdiff[1]);
+ len = sqrtf(mdiff[0] * mdiff[0] + mdiff[1] * mdiff[1]);
factor = len/scd->lenorig;
- mdiff[0] = factor*scd->init_sdim[0];
- mdiff[1] = factor*scd->init_sdim[1];
+ mdiff[0] = factor * scd->init_sdim[0];
+ mdiff[1] = factor * scd->init_sdim[1];
copy_v2_v2_int(scd->br->stencil_dimension, mdiff);
break;
}
@@ -532,10 +532,10 @@ static int stencil_control_modal(bContext *C, wmOperator *op, const wmEvent *eve
sub_v2_v2v2_int(mdiff, event->mval, scd->br->stencil_pos);
angle = atan2(mdiff[1], mdiff[0]);
angle = scd->init_rot + angle - scd->init_angle;
- if (angle < 0)
- angle += 2*M_PI;
- if (angle > 2*M_PI)
- angle -= 2*M_PI;
+ if (angle < 0.0f)
+ angle += (float)(2 * M_PI);
+ if (angle > (float)(2 * M_PI))
+ angle -= (float)(2 * M_PI);
scd->br->mtex.rot = angle;
break;
}
@@ -543,12 +543,12 @@ static int stencil_control_modal(bContext *C, wmOperator *op, const wmEvent *eve
}
break;
case LEFTMOUSE:
- if(event->val == KM_PRESS) {
+ if (event->val == KM_PRESS) {
MEM_freeN(op->customdata);
return OPERATOR_FINISHED;
}
case RIGHTMOUSE:
- if(event->val == KM_PRESS) {
+ if (event->val == KM_PRESS) {
return stencil_control_cancel(C, op);
}
default: