summaryrefslogtreecommitdiff
path: root/digital/avr/modules/math/geometry/vect.h
diff options
context:
space:
mode:
authorNicolas Schodet2010-04-13 00:21:52 +0200
committerNicolas Schodet2010-04-13 00:21:52 +0200
commit7f24f37772871ad4a420f59f93b97ab1ad9b0e24 (patch)
treedba5e34822f7937399abf6be56cd66f52297ccd2 /digital/avr/modules/math/geometry/vect.h
parentd7211fc08b077030cf7f065d3834e201d17c18a5 (diff)
digital/avr/modules/math/geometry: add normal and dot product
Diffstat (limited to 'digital/avr/modules/math/geometry/vect.h')
-rw-r--r--digital/avr/modules/math/geometry/vect.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/digital/avr/modules/math/geometry/vect.h b/digital/avr/modules/math/geometry/vect.h
index 6a1cc570..17fda6cb 100644
--- a/digital/avr/modules/math/geometry/vect.h
+++ b/digital/avr/modules/math/geometry/vect.h
@@ -83,6 +83,17 @@ vect_norm (const vect_t *v);
void
vect_from_polar_uf016 (vect_t *v, int16_t l, uint16_t a_uf016);
+/** Compute a vector normal (rotate the vector counter-clockwise of pi/2).
+ * - v: input/result vector. */
+void
+vect_normal (vect_t *v);
+
+/** Compute the dot product (scalar product) of two vectors.
+ * - a, b: vectors to make product of.
+ * - returns: dot product. */
+int32_t
+vect_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.