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>2012-01-22 21:20:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-22 21:20:37 +0400
commitcd4123e1db8a40836fa04813ef7dc440ef7feeb0 (patch)
tree9a10e2dd83251954c8dfcfddd430cb46931b9d99 /source/blender/blenlib/intern/math_geom.c
parent39aaf4f2f0af3e0663a19381d65081a9090fc10e (diff)
use inline BLI_math functions for dot product and length calculation.
Diffstat (limited to 'source/blender/blenlib/intern/math_geom.c')
-rw-r--r--source/blender/blenlib/intern/math_geom.c3
1 files changed, 2 insertions, 1 deletions
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;