Christophe Riccio 11 years ago
parent
commit
3556f4ad85
3 changed files with 13 additions and 73 deletions
  1. 0 68
      glm/detail/func_exponential.inl
  2. 1 1
      glm/detail/type_vec4.hpp
  3. 12 4
      glm/gtx/std_based_type.hpp

+ 0 - 68
glm/detail/func_exponential.inl

@@ -84,61 +84,14 @@ namespace detail
 
 
 	// pow
 	// pow
 	using std::pow;
 	using std::pow;
-
-/*
-	template <typename genType>
-	GLM_FUNC_QUALIFIER genType pow
-	(
-		genType const & x, 
-		genType const & y
-	)
-	{
-		GLM_STATIC_ASSERT(
-			std::numeric_limits<genType>::is_iec559,
-			"'pow' only accept floating-point inputs");
-
-		return std::pow(x, y);
-	}
-*/
-
 	VECTORIZE_VEC_VEC(pow)
 	VECTORIZE_VEC_VEC(pow)
 
 
 	// exp
 	// exp
 	using std::exp;
 	using std::exp;
-
-/*
-	template <typename genType>
-	GLM_FUNC_QUALIFIER genType exp
-	(
-		genType const & x
-	)
-	{
-		GLM_STATIC_ASSERT(
-			std::numeric_limits<genType>::is_iec559,
-			"'exp' only accept floating-point inputs");
-
-		return std::exp(x);
-	}
-*/
-
 	VECTORIZE_VEC(exp)
 	VECTORIZE_VEC(exp)
 
 
 	// log
 	// log
 	using std::log;
 	using std::log;
-/*
-	template <typename genType>
-	GLM_FUNC_QUALIFIER genType log
-	(
-		genType const & x
-	)
-	{
-		GLM_STATIC_ASSERT(
-			std::numeric_limits<genType>::is_iec559,
-			"'log' only accept floating-point inputs");
-
-		return std::log(x);
-	}
-*/
 	VECTORIZE_VEC(log)
 	VECTORIZE_VEC(log)
 
 
 	//exp2, ln2 = 0.69314718055994530941723212145818f
 	//exp2, ln2 = 0.69314718055994530941723212145818f
@@ -211,27 +164,6 @@ namespace detail
 	
 	
 	// sqrt
 	// sqrt
 	using std::sqrt;
 	using std::sqrt;
-/*
-	GLM_FUNC_QUALIFIER float sqrt(float x)
-	{
-#		ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
-			tvec1<float, highp> tmp(detail::compute_sqrt<tvec1, float, highp>::call(x));
-			return tmp.x;
-#		else
-			return detail::compute_sqrt<tvec1, float, highp>::call(x).x;
-#		endif
-	}
-
-	GLM_FUNC_QUALIFIER double sqrt(double x)
-	{
-#		ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
-			tvec1<double, highp> tmp(detail::compute_sqrt<tvec1, double, highp>::call(x));
-			return tmp.x;
-#		else
-			return detail::compute_sqrt<tvec1, double, highp>::call(x).x;
-#		endif
-	}
-*/
 	template <typename T, precision P, template <typename, precision> class vecType>
 	template <typename T, precision P, template <typename, precision> class vecType>
 	GLM_FUNC_QUALIFIER vecType<T, P> sqrt(vecType<T, P> const & x)
 	GLM_FUNC_QUALIFIER vecType<T, P> sqrt(vecType<T, P> const & x)
 	{
 	{

+ 1 - 1
glm/detail/type_vec4.hpp

@@ -144,7 +144,7 @@ namespace glm
 		// Implicit basic constructors
 		// Implicit basic constructors
 
 
 		GLM_FUNC_DECL tvec4();
 		GLM_FUNC_DECL tvec4();
-		GLM_FUNC_DECL tvec4(type const & v);
+		GLM_FUNC_DECL tvec4(tvec4<T, P> const & v);
 		template <precision Q>
 		template <precision Q>
 		GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);
 		GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);
 
 

+ 12 - 4
glm/gtx/std_based_type.hpp

@@ -49,11 +49,15 @@ namespace glm
 {
 {
 	/// @addtogroup gtx_std_based_type
 	/// @addtogroup gtx_std_based_type
 	/// @{
 	/// @{
-	
+
+	/// Vector type based of one std::size_t component.
+	/// @see GLM_GTX_std_based_type
+	typedef tvec1<std::size_t, defaultp>		size1;
+
 	/// Vector type based of two std::size_t components.
 	/// Vector type based of two std::size_t components.
 	/// @see GLM_GTX_std_based_type
 	/// @see GLM_GTX_std_based_type
 	typedef tvec2<std::size_t, defaultp>		size2;
 	typedef tvec2<std::size_t, defaultp>		size2;
-	
+
 	/// Vector type based of three std::size_t components.
 	/// Vector type based of three std::size_t components.
 	/// @see GLM_GTX_std_based_type
 	/// @see GLM_GTX_std_based_type
 	typedef tvec3<std::size_t, defaultp>		size3;
 	typedef tvec3<std::size_t, defaultp>		size3;
@@ -62,14 +66,18 @@ namespace glm
 	/// @see GLM_GTX_std_based_type
 	/// @see GLM_GTX_std_based_type
 	typedef tvec4<std::size_t, defaultp>		size4;
 	typedef tvec4<std::size_t, defaultp>		size4;
 
 
+	/// Vector type based of one std::size_t component.
+	/// @see GLM_GTX_std_based_type
+	typedef tvec1<std::size_t, defaultp>		size1_t;
+
 	/// Vector type based of two std::size_t components.
 	/// Vector type based of two std::size_t components.
 	/// @see GLM_GTX_std_based_type
 	/// @see GLM_GTX_std_based_type
 	typedef tvec2<std::size_t, defaultp>		size2_t;
 	typedef tvec2<std::size_t, defaultp>		size2_t;
-	
+
 	/// Vector type based of three std::size_t components.
 	/// Vector type based of three std::size_t components.
 	/// @see GLM_GTX_std_based_type
 	/// @see GLM_GTX_std_based_type
 	typedef tvec3<std::size_t, defaultp>		size3_t;
 	typedef tvec3<std::size_t, defaultp>		size3_t;
-	
+
 	/// Vector type based of four std::size_t components.
 	/// Vector type based of four std::size_t components.
 	/// @see GLM_GTX_std_based_type
 	/// @see GLM_GTX_std_based_type
 	typedef tvec4<std::size_t, defaultp>		size4_t;
 	typedef tvec4<std::size_t, defaultp>		size4_t;