summaryrefslogtreecommitdiffhomepage
path: root/digital/avr/modules/math/geometry/vect.c
diff options
context:
space:
mode:
authorNicolas Schodet2010-04-27 00:16:57 +0200
committerNicolas Schodet2010-04-27 00:16:57 +0200
commite0c9bedbaa25f8ab21294c9c210910479f6c52f6 (patch)
treec8936cc73c5e809b3c23465348c426da73c24c3a /digital/avr/modules/math/geometry/vect.c
parentc199bfa0012d763f1e4684c3cd0ab6c07134ddce (diff)
digital/avr/modules/math/geometry: add vect_normal_dot_product
Diffstat (limited to 'digital/avr/modules/math/geometry/vect.c')
-rw-r--r--digital/avr/modules/math/geometry/vect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/digital/avr/modules/math/geometry/vect.c b/digital/avr/modules/math/geometry/vect.c
index 88cc125f..821f6844 100644
--- a/digital/avr/modules/math/geometry/vect.c
+++ b/digital/avr/modules/math/geometry/vect.c
@@ -98,6 +98,12 @@ vect_dot_product (const vect_t *a, const vect_t *b)
return (int32_t) a->x * b->x + (int32_t) b->y * a->y;
}
+int32_t
+vect_normal_dot_product (const vect_t *a, const vect_t *b)
+{
+ return (int32_t) a->x * b->y - (int32_t) b->x * a->y;
+}
+
void
vect_array_scale_f824 (vect_t *va, uint8_t vn, int32_t s_f824)
{