diff options
author | Grigory Revzin <revzingg@gmail.com> | 2014-10-19 22:13:05 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-19 22:15:03 +0400 |
commit | 984836781e8f419d16681a2da1946fde9032e4f6 (patch) | |
tree | 73bd9859cf71f9f7ab79acab2cd621d6d26ced53 /source/blender | |
parent | 4dd5b635e8c5809561f35abc8cb9f42b8e104cf7 (diff) |
Fix typo in calculateCenterMedian that could give computed median point wrong values.
From soc-2014-shapekey branch, with minor edits by mont29 (Bastien Montagne).
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 24dc6f6e74b..b02671e18d8 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1651,8 +1651,9 @@ void calculateCenterMedian(TransInfo *t, float r_center[3]) } } } - if (i) - mul_v3_fl(partial, 1.0f / total); + if (total) { + mul_v3_fl(partial, 1.0f / (float)total); + } copy_v3_v3(r_center, partial); } |