summaryrefslogtreecommitdiff
path: root/lib/include/wolff/models/height.hpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-10-19 13:23:23 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-10-19 13:23:23 -0400
commit3b8e7ea25f0c23ca596c1c4e3e4f71d12c5fc065 (patch)
tree0400d589c68aaf38381591072e8faad09d3779f8 /lib/include/wolff/models/height.hpp
parent864e288c5cb51ae94ac09db8597714c605344c3d (diff)
downloadc++-3b8e7ea25f0c23ca596c1c4e3e4f71d12c5fc065.tar.gz
c++-3b8e7ea25f0c23ca596c1c4e3e4f71d12c5fc065.tar.bz2
c++-3b8e7ea25f0c23ca596c1c4e3e4f71d12c5fc065.zip
added more examples and cleaned up the model headers
Diffstat (limited to 'lib/include/wolff/models/height.hpp')
-rw-r--r--lib/include/wolff/models/height.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/include/wolff/models/height.hpp b/lib/include/wolff/models/height.hpp
index bd0ceb6..9d7e87c 100644
--- a/lib/include/wolff/models/height.hpp
+++ b/lib/include/wolff/models/height.hpp
@@ -4,6 +4,8 @@
#include <cmath>
#include <wolff/types.h>
+namespace wolff {
+
template <class T>
struct height_t {
T x;
@@ -28,6 +30,16 @@ struct height_t {
};
template <class T>
+inline typename height_t<T>::M_t operator*(v_t a, height_t<T> h) {
+ return h * a;
+}
+
+template <class T>
+inline typename height_t<T>::F_t operator*(double a, height_t<T> h) {
+ return h * a;
+}
+
+template <class T>
inline T& operator+=(T& M, const height_t<T> &h) {
M += h.x;
@@ -41,3 +53,5 @@ inline T& operator-=(T& M, const height_t<T> &h) {
return M;
}
+}
+