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-07-14 05:55:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-07-14 05:55:38 +0400
commitd9f39257f40d58caa53efcad112df9775f95d8bf (patch)
tree034569c38838000ad18290aa211a25946b66bc08 /source/blender/bmesh/operators/bmo_removedoubles.c
parentd56e6bf1bf82c2112913442e1a416fb6ebcc9fa5 (diff)
Math Lib: add compare_len_squared_v3v3 from paint branch
Diffstat (limited to 'source/blender/bmesh/operators/bmo_removedoubles.c')
-rw-r--r--source/blender/bmesh/operators/bmo_removedoubles.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c
index 814649c7dbf..954f31fc4a8 100644
--- a/source/blender/bmesh/operators/bmo_removedoubles.c
+++ b/source/blender/bmesh/operators/bmo_removedoubles.c
@@ -528,6 +528,7 @@ static void bmesh_find_doubles_common(BMesh *bm, BMOperator *op,
int i, j, keepvert = 0;
const float dist = BMO_slot_float_get(op->slots_in, "dist");
+ const float dist_sq = dist * dist;
const float dist3 = dist * 3.0f;
/* Test whether keep_verts arg exists and is non-empty */
@@ -576,7 +577,7 @@ static void bmesh_find_doubles_common(BMesh *bm, BMOperator *op,
continue;
}
- if (compare_len_v3v3(v_check->co, v_other->co, dist)) {
+ if (compare_len_squared_v3v3(v_check->co, v_other->co, dist_sq)) {
/* If one vert is marked as keep, make sure it will be the target */
if (BMO_elem_flag_test(bm, v_other, VERT_KEEP)) {