summaryrefslogtreecommitdiff
path: root/flower
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2015-08-11 19:07:12 +0200
committerDavid Kastrup <dak@gnu.org>2015-08-20 10:35:29 +0200
commit862a333642d6d4be26a85809aab1e10b7918dbf3 (patch)
tree0d8d7635fce5b1dbfd76d5777cbd8a2e1663267f /flower
parenta2db8f6cfb8bcb2438796450e16c39c47c92dbc1 (diff)
Implement inline Real cross_product (Offset, Offset)
Diffstat (limited to 'flower')
-rw-r--r--flower/include/offset.hh8
1 files changed, 8 insertions, 0 deletions
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 */