[Bf-blender-cvs] [fdcb9fc] master: Bevel: Avoid sqrt comparing lengths
Campbell Barton
noreply at git.blender.org
Mon Apr 28 16:35:44 CEST 2014
Commit: fdcb9fcb7e4b32eb32ed7b2cae9451f297884170
Author: Campbell Barton
Date: Mon Apr 28 23:35:23 2014 +1000
https://developer.blender.org/rBfdcb9fcb7e4b32eb32ed7b2cae9451f297884170
Bevel: Avoid sqrt comparing lengths
===================================================================
M source/blender/bmesh/tools/bmesh_bevel.c
===================================================================
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 3f9ffa7..18abf5c 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -3152,11 +3152,11 @@ static void bevel_reattach_wires(BMesh *bm, BevelParams *bp, BMVert *v)
if (BM_edge_is_wire(e)) {
/* look for the new vertex closest to the other end of e */
vclosest = NULL;
- dclosest = 1e10;
+ dclosest = FLT_MAX;
vother = BM_edge_other_vert(e, v);
bndv = bv->vmesh->boundstart;
do {
- d = len_v3v3(vother->co, bndv->nv.co);
+ d = len_squared_v3v3(vother->co, bndv->nv.co);
if (d < dclosest) {
vclosest = bndv->nv.v;
BLI_assert(vclosest != NULL);
More information about the Bf-blender-cvs
mailing list