diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-09-06 17:48:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-09-18 09:40:55 +0300 |
commit | f1422c40af7527141ab348ad2522d7d2435ccb1c (patch) | |
tree | f874fc2d80506ebff69439984165c28e9e0bb82d /source/blender/editors/armature/armature_utils.c | |
parent | 2eb50d450c9ea5092049a8d0458b87ca9c838e5f (diff) |
Use squared length where possible
Diffstat (limited to 'source/blender/editors/armature/armature_utils.c')
-rw-r--r-- | source/blender/editors/armature/armature_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index 635297c088a..61ed7fdc41b 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -565,9 +565,9 @@ void ED_armature_from_edit(bArmature *arm) /* remove zero sized bones, this gives unstable restposes */ for (eBone = arm->edbo->first; eBone; eBone = neBone) { - float len = len_v3v3(eBone->head, eBone->tail); + float len_sq = len_squared_v3v3(eBone->head, eBone->tail); neBone = eBone->next; - if (len <= 0.000001f) { /* FLT_EPSILON is too large? */ + if (len_sq <= SQUARE(0.000001f)) { /* FLT_EPSILON is too large? */ EditBone *fBone; /* Find any bones that refer to this bone */ |