diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-09-28 08:39:38 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-09-28 09:08:55 +0400 |
commit | 4a92620d3eb32da477bb7995c517e4f4b071a6a4 (patch) | |
tree | 417c6f5aaed5fc2fc08603ecd57a57c6eefb425d /source/blender/blenlib/intern/math_vector_inline.c | |
parent | 7803cb09f3852ff14a5169f1a31bf1f4389bd296 (diff) |
Comments: clarify math lib
Diffstat (limited to 'source/blender/blenlib/intern/math_vector_inline.c')
-rw-r--r-- | source/blender/blenlib/intern/math_vector_inline.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index 5529433f6c9..da9d5bd3f49 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -957,6 +957,18 @@ MINLINE bool compare_v4v4(const float v1[4], const float v2[4], const float limi return false; } +/** + * <pre> + * + l1 + * | + * neg <- | -> pos + * | + * + l2 + * </pre> + * + * \return Positive value when 'pt' is left-of-line + * (looking from 'l1' -> 'l2'). + */ MINLINE float line_point_side_v2(const float l1[2], const float l2[2], const float pt[2]) { return (((l1[0] - pt[0]) * (l2[1] - pt[1])) - |