diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-13 02:31:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-13 02:31:02 +0400 |
commit | 2ce3bd0d672e7e26e1a8710444872ad6478a7565 (patch) | |
tree | 213ca770eedaaf3640f46274192557dbb5235ce4 /source | |
parent | fa873f956c12c26555b46626c2d2c9595352aca1 (diff) |
code cleanup: use more obvious assignments for transform snapping angles.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform.c | 20 | ||||
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 239d6297695..b08f66d0454 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -2600,8 +2600,8 @@ void initWarp(TransInfo *t) t->idx_max = 0; t->num.idx_max = 0; t->snap[0] = 0.0f; - t->snap[1] = 5.0f / 180.0f * (float)M_PI; - t->snap[2] = 1.0f / 180.0f * (float)M_PI; + t->snap[1] = DEG2RAD(5.0); + t->snap[2] = DEG2RAD(1.0); t->num.increment = 1.0f; @@ -3369,8 +3369,8 @@ void initRotation(TransInfo *t) t->idx_max = 0; t->num.idx_max = 0; t->snap[0] = 0.0f; - t->snap[1] = (float)((5.0 / 180) * M_PI); - t->snap[2] = t->snap[1] * 0.2f; + t->snap[1] = DEG2RAD(5.0); + t->snap[2] = DEG2RAD(1.0); t->num.increment = 1.0f; @@ -3701,8 +3701,8 @@ void initTrackball(TransInfo *t) t->idx_max = 1; t->num.idx_max = 1; t->snap[0] = 0.0f; - t->snap[1] = (float)((5.0 / 180) * M_PI); - t->snap[2] = t->snap[1] * 0.2f; + t->snap[1] = DEG2RAD(5.0); + t->snap[2] = DEG2RAD(1.0); t->num.increment = 1.0f; @@ -4149,8 +4149,8 @@ void initTilt(TransInfo *t) t->idx_max = 0; t->num.idx_max = 0; t->snap[0] = 0.0f; - t->snap[1] = (float)((5.0 / 180) * M_PI); - t->snap[2] = t->snap[1] * 0.2f; + t->snap[1] = DEG2RAD(5.0); + t->snap[2] = DEG2RAD(1.0); t->num.increment = t->snap[1]; @@ -6435,8 +6435,8 @@ void initBoneRoll(TransInfo *t) t->idx_max = 0; t->num.idx_max = 0; t->snap[0] = 0.0f; - t->snap[1] = (float)((5.0 / 180) * M_PI); - t->snap[2] = t->snap[1] * 0.2f; + t->snap[1] = DEG2RAD(5.0); + t->snap[2] = DEG2RAD(1.0); t->num.increment = 1.0f; diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index a908b403c03..8a4022de104 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -82,7 +82,7 @@ static void rna_generate_static_parameter_prototypes(FILE *f, StructRNA *srna, F fprintf(f, param); \ } (void)0 -static int replace_if_different(char *tmpfile, const char *dep_files[]) +static int replace_if_different(const char *tmpfile, const char *dep_files[]) { /* return 0; *//* use for testing had edited rna */ |