From 55a3d48046377444a3c36ffe7a6164030d447f6f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 21 Apr 2017 17:26:27 +1000 Subject: Docs: diagram for reflect_v3_v3v3 --- source/blender/blenlib/intern/math_vector.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index dfecc3b556a..37897e2cd32 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -697,7 +697,19 @@ void bisect_v3_v3v3v3(float out[3], const float v1[3], const float v2[3], const /** * Returns a reflection vector from a vector and a normal vector - * reflect = vec - ((2 * DotVecs(vec, mirror)) * mirror) + * reflect = vec - ((2 * dot(vec, mirror)) * mirror). + * + *
+ * v
+ * +  ^
+ *  \ |
+ *   \|
+ *    + normal: axis of reflection
+ *   /
+ *  /
+ * +
+ * out: result (negate for a 'bounce').
+ * 
*/ void reflect_v3_v3v3(float out[3], const float v[3], const float normal[3]) { -- cgit v1.2.3