Added GLM_FORCE_SIZE_FUNC to replace .length() by .size() #245
This commit is contained in:
@@ -66,7 +66,13 @@ namespace glm
|
||||
public:
|
||||
T x, y, z, w;
|
||||
|
||||
#if GLM_FORCE_SIZE_FUNC
|
||||
/// Return the count of components of a quaternion
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR size_t size() const;
|
||||
#else
|
||||
/// Return the count of components of a quaternion
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
|
||||
#endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tquat();
|
||||
|
||||
@@ -45,11 +45,19 @@ namespace detail
|
||||
};
|
||||
}//namespace detail
|
||||
|
||||
#if GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR size_t tquat<T, P>::size() const
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
#else
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tquat<T, P>::length() const
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat() :
|
||||
|
||||
Reference in New Issue
Block a user