diff --git a/include/math/vector2d.h b/include/math/vector2d.h index 25e17ca727..d883b9750d 100644 --- a/include/math/vector2d.h +++ b/include/math/vector2d.h @@ -28,7 +28,7 @@ #ifndef VECTOR2D_H_ #define VECTOR2D_H_ -#include +#include #include #include @@ -54,8 +54,6 @@ template <> struct VECTOR2_TRAITS { typedef int64_t extended_type; - static const extended_type ECOORD_MAX = 0x7fffffffffffffffULL; - static const extended_type ECOORD_MIN = 0x8000000000000000ULL; }; // Forward declarations for template friends @@ -73,12 +71,15 @@ std::ostream& operator<<( std::ostream& aStream, const VECTOR2& aVector ); * */ template -class VECTOR2 : public VECTOR2_TRAITS +class VECTOR2 { public: typedef typename VECTOR2_TRAITS::extended_type extended_type; typedef T coord_type; + static constexpr extended_type ECOORD_MAX = std::numeric_limits::max(); + static constexpr extended_type ECOORD_MIN = std::numeric_limits::min(); + T x, y; // Constructors