diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-09-05 10:06:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-09-05 10:10:07 +0300 |
commit | ba188cf98d8387747a2fc389fc51dd459d061b15 (patch) | |
tree | 38ceff986ee8180034256385b3c0e44fb9bc2aae /source | |
parent | ac51e2f326965816e23f7948e2e3fbdfb07cb66c (diff) |
Math Lib: simplify isect_plane_plane_v3
Unlike the 3 plane method, the 2 planes squared cross-product _is_ the determinant.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/math_geom.c | 3 |
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 548aed3a8ae..72ae9597777 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -1617,7 +1617,8 @@ bool isect_plane_plane_v3( /* direction is simply the cross product */ cross_v3_v3v3(plane_c, plane_a, plane_b); - det = determinant_m3(UNPACK3(plane_a), UNPACK3(plane_b), UNPACK3(plane_c)); + /* in this case we don't need to use 'determinant_m3' */ + det = len_squared_v3(plane_c); if (det != 0.0f) { float tmp[3]; |