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-03-29 15:23:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-29 15:24:12 +0400
commitfb0959f88dc57a73eacd36600607cd10584da387 (patch)
tree0e2a500050613bcd53005b81956e4b12c10f424e /source/blender/bmesh/intern
parent6bba006bf2bb7ef4b8758a215def13885fc2f9f7 (diff)
Code cleanup: replace dot with len_squared and is_zero checks
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index 867c54ad4b8..aff7d37abe9 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -311,7 +311,7 @@ void BM_face_calc_plane(BMFace *f, float r_plane[3])
sub_v3_v3v3(vec_b, verts[1]->co, verts[2]->co);
add_v3_v3v3(vec, vec_a, vec_b);
/* use the biggest edge length */
- if (dot_v3v3(r_plane, r_plane) < dot_v3v3(vec, vec)) {
+ if (len_squared_v3(r_plane) < len_squared_v3(vec)) {
copy_v3_v3(r_plane, vec);
}
}
@@ -723,7 +723,7 @@ bool BM_face_point_inside_test(BMFace *f, const float co[3])
int crosses = 0;
float onepluseps = 1.0f + (float)FLT_EPSILON * 150.0f;
- if (dot_v3v3(f->no, f->no) <= FLT_EPSILON * 10)
+ if (is_zero_v3(f->no))
BM_face_normal_update(f);
/* find best projection of face XY, XZ or YZ: barycentric weights of