From: David Kastrup <dak@gnu.org>
Date: Tue, 11 Aug 2015 17:07:12 +0000 (+0200)
Subject: Implement inline Real cross_product (Offset, Offset)
X-Git-Tag: release/2.19.26-1~34
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=862a333642d6d4be26a85809aab1e10b7918dbf3;p=lilypond.git

Implement inline Real cross_product (Offset, Offset)
---

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 */