From 862a333642d6d4be26a85809aab1e10b7918dbf3 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Tue, 11 Aug 2015 19:07:12 +0200 Subject: [PATCH] Implement inline Real cross_product (Offset, Offset) --- flower/include/offset.hh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flower/include/offset.hh b/flower/include/offset.hh index cddec1fc00..8f395398b7 100644 --- a/flower/include/offset.hh +++ b/flower/include/offset.hh @@ -169,5 +169,13 @@ dot_product (Offset o1, Offset o2) return o1[X_AXIS] * o2[X_AXIS] + o1[Y_AXIS] * o2[Y_AXIS]; } +inline +Real +cross_product (Offset o1, Offset o2) +{ + return o1[X_AXIS] * o2[Y_AXIS] - o1[Y_AXIS] * o2[X_AXIS]; +} + + #endif /* OFFSET_HH */ -- 2.39.5