]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/offset.hh
Imported Upstream version 2.19.45
[lilypond.git] / flower / include / offset.hh
index ba369a5c70124c7d998409ab36292aedd8d5683c..8f395398b75e2768d31f476737142502c3a7eedd 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1996--2012 Han-Wen Nienhuys
+  Copyright (C) 1996--2015 Han-Wen Nienhuys
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -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 */