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>2014-04-20 19:54:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-20 20:02:21 +0400
commit55d75f5020ebdbaeb9cab1c7be565c83ba722bc2 (patch)
tree0798082991ace83f32f4d6c77b24629badf67ac4 /source/blender/editors/sculpt_paint/sculpt.c
parent1a1bc281e64624d1a6b798f8dd84dda134f0f45a (diff)
Code cleanup: correct abs use
also minor cleanup to rotation code
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 5f0ff4a1cfd..fcb2e6ad588 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -4193,7 +4193,9 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
/* change of sign, we passed the 180 degree threshold. This means we need to add a turn.
* to distinguish between transition from 0 to -1 and -PI to +PI, use comparison with PI/2 */
- if (mouse_angle * cache->previous_vertex_rotation < 0 && fabs(cache->previous_vertex_rotation) > M_PI_2) {
+ if ((mouse_angle * cache->previous_vertex_rotation < 0.0f) &&
+ (fabsf(cache->previous_vertex_rotation) > (float)M_PI_2))
+ {
if (cache->previous_vertex_rotation < 0)
cache->num_vertex_turns--;
else