diff options
author | David Kastrup <dak@gnu.org> | 2015-08-11 19:07:12 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2015-08-20 10:35:29 +0200 |
commit | 862a333642d6d4be26a85809aab1e10b7918dbf3 (patch) | |
tree | 0d8d7635fce5b1dbfd76d5777cbd8a2e1663267f /flower | |
parent | a2db8f6cfb8bcb2438796450e16c39c47c92dbc1 (diff) |
Implement inline Real cross_product (Offset, Offset)
Diffstat (limited to 'flower')
-rw-r--r-- | flower/include/offset.hh | 8 |
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 */ |