From cd4123e1db8a40836fa04813ef7dc440ef7feeb0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 22 Jan 2012 17:20:37 +0000 Subject: use inline BLI_math functions for dot product and length calculation. --- source/blender/blenlib/intern/math_geom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/blenlib/intern/math_geom.c') diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index d7880e40626..500e27064d7 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -2485,8 +2485,9 @@ void tangent_from_uv(float uv1[2], float uv2[2], float uv3[3], float co1[3], flo cross_v3_v3v3(ct, tang, tangv); /* check flip */ - if ((ct[0]*n[0] + ct[1]*n[1] + ct[2]*n[2]) < 0.0f) + if (dot_v3v3(ct, n) < 0.0f) { negate_v3(tang); + } } else { tang[0]= tang[1]= tang[2]= 0.0; -- cgit v1.2.3