diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-28 17:35:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-28 18:35:32 +0400 |
commit | fdcb9fcb7e4b32eb32ed7b2cae9451f297884170 (patch) | |
tree | dc0e7c88573a7d1ba6507451ac9ef51bcb37e2b4 /source/blender/bmesh/tools/bmesh_bevel.c | |
parent | 6feec25bddfb96f979c89611840f1f558b7cd92c (diff) |
Bevel: Avoid sqrt comparing lengths
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_bevel.c')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bevel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 3f9ffa710ab..18abf5ce0bc 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); |