From 98aececc8e61e7d6d9225e59ab10d27da9498953 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 25 Feb 2012 20:58:03 +0000 Subject: bmesh code cleanup * change BMO_elem_flag_* defines to inline functions. * BMO_slot_map_insert() is too big for an inline function - un-inline it. * remove redundant casts. --- source/blender/bmesh/intern/bmesh_polygon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/bmesh/intern/bmesh_polygon.c') diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 19b13a00f6d..c511193209e 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -135,12 +135,12 @@ static void compute_poly_normal(float normal[3], float (*verts)[3], int nverts) so thats?: (a[1] - b[1]) * (a[2] + b[2]); - a[1]*b[2] - b[1]*a[2] - b[1]*b[2] + a[1]*a[2] + a[1] * b[2] - b[1] * a[2] - b[1] * b[2] + a[1] * a[2] odd. half of that is the cross product. . .what's the other half? - also could be like a[1]*(b[2] + a[2]) - b[1]*(a[2] - b[2]) + also could be like a[1] * (b[2] + a[2]) - b[1] * (a[2] - b[2]) */ n[0] += (u[1] - v[1]) * (u[2] + v[2]); -- cgit v1.2.3