diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-12-25 13:14:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-12-26 00:46:48 +0300 |
commit | 445e50fd1e7d41306ea475bd79bb89bc2d7fc3b1 (patch) | |
tree | eb5c1f2b6494a0cb8094fa5a64b5a374564fa935 /source/blender/blenlib/intern/math_geom.c | |
parent | cd095aae139ecbcfdf2103f635eae8d5bc5f3b8e (diff) |
cleanup: use cross_tri_v2 when area isn't needed.
Diffstat (limited to 'source/blender/blenlib/intern/math_geom.c')
-rw-r--r-- | source/blender/blenlib/intern/math_geom.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 42aa24d284d..bcf2147fd84 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -2350,15 +2350,15 @@ bool barycentric_coords_v2(const float v1[2], const float v2[2], const float v3[ } /** - * \note: using #area_tri_signed_v2 means locations outside the triangle are correctly weighted + * \note: using #cross_tri_v2 means locations outside the triangle are correctly weighted */ void barycentric_weights_v2(const float v1[2], const float v2[2], const float v3[2], const float co[2], float w[3]) { float wtot; - w[0] = area_tri_signed_v2(v2, v3, co); - w[1] = area_tri_signed_v2(v3, v1, co); - w[2] = area_tri_signed_v2(v1, v2, co); + w[0] = cross_tri_v2(v2, v3, co); + w[1] = cross_tri_v2(v3, v1, co); + w[2] = cross_tri_v2(v1, v2, co); wtot = w[0] + w[1] + w[2]; if (wtot != 0.0f) { @@ -2377,9 +2377,9 @@ void barycentric_weights_v2_persp(const float v1[4], const float v2[4], const fl { float wtot; - w[0] = area_tri_signed_v2(v2, v3, co) / v1[3]; - w[1] = area_tri_signed_v2(v3, v1, co) / v2[3]; - w[2] = area_tri_signed_v2(v1, v2, co) / v3[3]; + w[0] = cross_tri_v2(v2, v3, co) / v1[3]; + w[1] = cross_tri_v2(v3, v1, co) / v2[3]; + w[2] = cross_tri_v2(v1, v2, co) / v3[3]; wtot = w[0] + w[1] + w[2]; if (wtot != 0.0f) { |