diff --git a/glm/core/_detail.hpp b/glm/core/_detail.hpp index 3b6a3b7d..9ec2a941 100644 --- a/glm/core/_detail.hpp +++ b/glm/core/_detail.hpp @@ -324,24 +324,25 @@ namespace detail is_bool = is_bool::_YES }; }; -}//namespace detail - + ////////////////// // type - + typedef signed char int8; typedef signed short int16; typedef signed int int32; typedef detail::sint64 int64; - + typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; typedef detail::uint64 uint64; - + typedef detail::thalf float16; typedef float float32; typedef double float64; + +}//namespace detail }//namespace glm diff --git a/glm/core/func_vector_relational.hpp b/glm/core/func_vector_relational.hpp index a283f2b2..1b7d8094 100644 --- a/glm/core/func_vector_relational.hpp +++ b/glm/core/func_vector_relational.hpp @@ -53,161 +53,56 @@ namespace glm /// @see - GLSL lessThan man page /// @see - GLSL 4.20.8 specification, section 8.7 template class vecType> - GLM_FUNC_QUALIFIER typename vecType::bool_type lessThan - ( - vecType const & x, - vecType const & y - ) - { - GLM_STATIC_ASSERT(detail::is_vector >::_YES, - "Invalid template instantiation of 'lessThan', GLM vector types required"); - GLM_STATIC_ASSERT(detail::is_bool::_NO, - "Invalid template instantiation of 'lessThan', GLM vector types required floating-point or integer value types vectors"); - - typename vecType::bool_type Result(vecType::null); - for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) - Result[i] = x[i] < y[i]; - - return Result; - } + GLM_FUNC_QUALIFIER typename vecType::bool_type lessThan(vecType const & x, vecType const & y); //! Returns the component-wise comparison of result x <= y. //! /// @see - GLSL lessThanEqual man page /// @see - GLSL 4.20.8 specification, section 8.7 template class vecType> - GLM_FUNC_QUALIFIER typename vecType::bool_type lessThanEqual - ( - vecType const & x, - vecType const & y - ) - { - GLM_STATIC_ASSERT(detail::is_vector >::_YES, - "Invalid template instantiation of 'lessThanEqual', GLM vector types required"); - GLM_STATIC_ASSERT(detail::is_bool::_NO, - "Invalid template instantiation of 'lessThanEqual', GLM vector types required floating-point or integer value types vectors"); - - typename vecType::bool_type Result(vecType::null); - for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) - Result[i] = x[i] <= y[i]; - return Result; - } + GLM_FUNC_QUALIFIER typename vecType::bool_type lessThanEqual(vecType const & x, vecType const & y); //! Returns the component-wise comparison of result x > y. //! /// @see - GLSL greaterThan man page /// @see - GLSL 4.20.8 specification, section 8.7 template class vecType> - GLM_FUNC_QUALIFIER typename vecType::bool_type greaterThan - ( - vecType const & x, - vecType const & y - ) - { - GLM_STATIC_ASSERT(detail::is_vector >::_YES, - "Invalid template instantiation of 'greaterThan', GLM vector types required"); - GLM_STATIC_ASSERT(detail::is_bool::_NO, - "Invalid template instantiation of 'greaterThan', GLM vector types required floating-point or integer value types vectors"); - - typename vecType::bool_type Result(vecType::null); - for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) - Result[i] = x[i] > y[i]; - return Result; - } + GLM_FUNC_QUALIFIER typename vecType::bool_type greaterThan(vecType const & x, vecType const & y); //! Returns the component-wise comparison of result x >= y. //! /// @see - GLSL greaterThanEqual man page /// @see - GLSL 4.20.8 specification, section 8.7 template class vecType> - GLM_FUNC_QUALIFIER typename vecType::bool_type greaterThanEqual - ( - vecType const & x, - vecType const & y - ) - { - GLM_STATIC_ASSERT(detail::is_vector >::_YES, - "Invalid template instantiation of 'greaterThanEqual', GLM vector types required"); - GLM_STATIC_ASSERT(detail::is_bool::_NO, - "Invalid template instantiation of 'greaterThanEqual', GLM vector types required floating-point or integer value types vectors"); - - typename vecType::bool_type Result(vecType::null); - for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) - Result[i] = x[i] >= y[i]; - return Result; - } + typename vecType::bool_type greaterThanEqual(vecType const & x, vecType const & y); //! Returns the component-wise comparison of result x == y. //! /// @see - GLSL equal man page /// @see - GLSL 4.20.8 specification, section 8.7 template class vecType> - GLM_FUNC_QUALIFIER typename vecType::bool_type equal - ( - vecType const & x, - vecType const & y - ) - { - GLM_STATIC_ASSERT(detail::is_vector >::_YES, - "Invalid template instantiation of 'equal', GLM vector types required"); - - typename vecType::bool_type Result(vecType::null); - for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) - Result[i] = x[i] == y[i]; - return Result; - } + GLM_FUNC_QUALIFIER typename vecType::bool_type equal(vecType const & x, vecType const & y); //! Returns the component-wise comparison of result x != y. //! /// @see - GLSL notEqual man page /// @see - GLSL 4.20.8 specification, section 8.7 template class vecType> - GLM_FUNC_QUALIFIER typename vecType::bool_type notEqual - ( - vecType const & x, - vecType const & y - ) - { - GLM_STATIC_ASSERT(detail::is_vector >::_YES, - "Invalid template instantiation of 'notEqual', GLM vector types required"); - - typename vecType::bool_type Result(vecType::null); - for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) - Result[i] = x[i] != y[i]; - return Result; - } + typename vecType::bool_type notEqual(vecType const & x, vecType const & y); //! Returns true if any component of x is true. //! /// @see - GLSL any man page /// @see - GLSL 4.20.8 specification, section 8.7 template