From e0c9bedbaa25f8ab21294c9c210910479f6c52f6 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Tue, 27 Apr 2010 00:16:57 +0200 Subject: digital/avr/modules/math/geometry: add vect_normal_dot_product --- digital/avr/modules/math/geometry/vect.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'digital/avr/modules/math/geometry/vect.h') diff --git a/digital/avr/modules/math/geometry/vect.h b/digital/avr/modules/math/geometry/vect.h index 17fda6cb..0042db7a 100644 --- a/digital/avr/modules/math/geometry/vect.h +++ b/digital/avr/modules/math/geometry/vect.h @@ -94,6 +94,16 @@ vect_normal (vect_t *v); int32_t vect_dot_product (const vect_t *a, const vect_t *b); +/** Compute the dot product (scalar product) of a normal of the first vector + * with the second vector. + * - a: vector to take normal of. + * - b: vector to make product with. + * - returns: dot product. + * The first vector is rotated of pi/2. The result is the same as the z part + * of the vector product. */ +int32_t +vect_normal_dot_product (const vect_t *a, const vect_t *b); + /** Scale (multiply) vectors by a fixed point value. * - va: input/result vectors array. * - vn: number of vectors. -- cgit v1.2.3