From 4a92620d3eb32da477bb7995c517e4f4b071a6a4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 28 Sep 2014 14:39:38 +1000 Subject: Comments: clarify math lib --- source/blender/blenlib/intern/math_vector_inline.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/blender/blenlib/intern/math_vector_inline.c') 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; } +/** + *
+ *        + l1
+ *        |
+ * neg <- | -> pos
+ *        |
+ *        + l2
+ * 
+ * + * \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])) - -- cgit v1.2.3