From dddcbe58e6e73adff918ae4441569bffe8ffc5c6 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 17 Sep 2013 01:06:45 +0200 Subject: [PATCH] Factorized float to uint and co function code. --- glm/core/func_common.hpp | 80 ++++++++---- glm/core/func_common.inl | 204 ++++-------------------------- glm/core/func_geometric.hpp | 12 +- glm/core/func_geometric.inl | 2 + glm/core/func_integer.hpp | 2 + glm/core/func_integer.inl | 5 + glm/core/func_noise.hpp | 5 + glm/core/func_packing.hpp | 24 ++-- glm/core/func_packing.inl | 32 ++--- glm/core/type_float.hpp | 18 --- glm/core/type_half.inl | 18 +++ test/core/core_func_common.cpp | 53 +++++++- test/core/core_func_geometric.cpp | 2 +- test/core/core_func_integer.cpp | 2 +- test/core/core_func_noise.cpp | 2 +- test/core/core_func_packing.cpp | 2 +- 16 files changed, 199 insertions(+), 264 deletions(-) diff --git a/glm/core/func_common.hpp b/glm/core/func_common.hpp index 8d1a6dfd..1457930d 100644 --- a/glm/core/func_common.hpp +++ b/glm/core/func_common.hpp @@ -262,7 +262,7 @@ namespace glm genTypeT const & y, genTypeU const & a); - /// Returns 0.0 if x < edge, otherwise it returns 1.0. + /// Returns 0.0 if x < edge, otherwise it returns 1.0 for each component of a genType. /// /// @see GLSL step man page /// @see GLSL 4.20.8 specification, section 8.3 Common Functions @@ -271,10 +271,14 @@ namespace glm genType const & edge, genType const & x); - template - GLM_FUNC_DECL genType step( - typename genType::T const & edge, - genType const & x); + /// Returns 0.0 if x < edge, otherwise it returns 1.0. + /// + /// @see GLSL step man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template