Wrap tvec1's static constants in GLM_STATIC_CONST_MEMBERS

This commit is contained in:
Jesse Talavera-Greenberg 2015-10-05 18:22:43 -04:00
parent a92ed0cdf5
commit 5a60b3986b
3 changed files with 5 additions and 0 deletions

View File

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

View File

@ -32,11 +32,13 @@
namespace glm
{
# ifdef GLM_STATIC_CONST_MEMBERS
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));
# endif
// -- Implicit basic constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)

View File

@ -32,6 +32,7 @@
#if !(GLM_COMPILER & GLM_COMPILER_GCC)
# define GLM_META_PROG_HELPERS
#endif
#define GLM_STATIC_CONST_MEMBERS
#define GLM_SWIZZLE
#include <glm/vector_relational.hpp>
#include <glm/gtc/vec1.hpp>