diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-03-29 15:23:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-03-29 15:24:12 +0400 |
commit | fb0959f88dc57a73eacd36600607cd10584da387 (patch) | |
tree | 0e2a500050613bcd53005b81956e4b12c10f424e /source/blender/blenkernel/intern/armature.c | |
parent | 6bba006bf2bb7ef4b8758a215def13885fc2f9f7 (diff) |
Code cleanup: replace dot with len_squared and is_zero checks
Diffstat (limited to 'source/blender/blenkernel/intern/armature.c')
-rw-r--r-- | source/blender/blenkernel/intern/armature.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 11a34ce9d38..afd3ae7e85d 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -674,7 +674,7 @@ float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3 sub_v3_v3v3(pdelta, vec, b1); a = dot_v3v3(bdelta, pdelta); - hsqr = dot_v3v3(pdelta, pdelta); + hsqr = len_squared_v3(pdelta); if (a < 0.0f) { /* If we're past the end of the bone, do a spherical field attenuation thing */ @@ -1459,7 +1459,7 @@ void vec_roll_to_mat3(const float vec[3], const float roll, float mat[3][3]) * roll when toggling editmode again... * No good value here, trying 0.000000001 as best compromise. :/ */ - if (dot_v3v3(axis, axis) > 1.0e-9f) { + if (len_squared_v3(axis) > 1.0e-9f) { /* if nor is *not* a multiple of target ... */ normalize_v3(axis); |