[Bf-blender-cvs] [1b8afac] master: Cleanup: remove redundant normalize

Campbell Barton noreply at git.blender.org
Mon Aug 3 12:53:34 CEST 2015


Commit: 1b8afac652e6d2f2c78177957854c5ceb688e3a0
Author: Campbell Barton
Date:   Mon Aug 3 20:44:00 2015 +1000
Branches: master
https://developer.blender.org/rB1b8afac652e6d2f2c78177957854c5ceb688e3a0

Cleanup: remove redundant normalize

===================================================================

M	source/blender/bmesh/operators/bmo_similar.c

===================================================================

diff --git a/source/blender/bmesh/operators/bmo_similar.c b/source/blender/bmesh/operators/bmo_similar.c
index 5f84389..825a158 100644
--- a/source/blender/bmesh/operators/bmo_similar.c
+++ b/source/blender/bmesh/operators/bmo_similar.c
@@ -102,7 +102,6 @@ void bmo_similar_faces_exec(BMesh *bm, BMOperator *op)
 	float angle = 0.0f;
 	SimSel_FaceExt *f_ext = NULL;
 	int *indices = NULL;
-	float t_no[3];	/* temporary normal */
 	const int type = BMO_slot_int_get(op->slots_in, "type");
 	const float thresh = BMO_slot_float_get(op->slots_in, "thresh");
 	const float thresh_radians = thresh * (float)M_PI;
@@ -158,12 +157,8 @@ void bmo_similar_faces_exec(BMesh *bm, BMOperator *op)
 					/* compute the center of the polygon */
 					BM_face_calc_center_mean(f_ext[i].f, f_ext[i].c);
 
-					/* normalize the polygon normal */
-					copy_v3_v3(t_no, f_ext[i].f->no);
-					normalize_v3(t_no);
-
 					/* compute the plane distance */
-					f_ext[i].d = dot_v3v3(t_no, f_ext[i].c);
+					f_ext[i].d = dot_v3v3(f_ext[i].f->no, f_ext[i].c);
 					break;
 
 				case SIMFACE_AREA:




More information about the Bf-blender-cvs mailing list