Add static constants for vec1

- Tests, too
This commit is contained in:
Jesse Talavera-Greenberg
2015-10-02 18:32:39 -04:00
parent daaf86dcef
commit b8ff59a61b
3 changed files with 20 additions and 0 deletions

View File

@@ -59,6 +59,8 @@ namespace glm
static GLM_RELAXED_CONSTEXPR precision prec = P;
# endif//GLM_META_PROG_HELPERS
static const type ZERO;
static const type X;
// -- Data --
# if GLM_HAS_ANONYMOUS_UNION

View File

@@ -32,6 +32,11 @@
namespace glm
{
template<typename T, precision P>
const tvec1<T, P> tvec1<T, P>::X = tvec1<T, P>(static_cast<T>(1));
template<typename T, precision P>
const tvec1<T, P> tvec1<T, P>::ZERO = tvec1<T, P>(static_cast<T>(0));
// -- Implicit basic constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)