diff options
Diffstat (limited to 'lib/include/wolff/models/height.hpp')
| -rw-r--r-- | lib/include/wolff/models/height.hpp | 14 | 
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;  } +} +  | 
