Browse Source

Fixed *vec1 scalar constructor

Christophe Riccio 11 years ago
parent
commit
ca4ed31fb6
3 changed files with 7 additions and 9 deletions
  1. 1 1
      glm/detail/func_geometric.inl
  2. 1 2
      glm/detail/type_vec1.hpp
  3. 5 6
      glm/detail/type_vec1.inl

+ 1 - 1
glm/detail/func_geometric.inl

@@ -180,7 +180,7 @@ namespace detail
 	)
 	{
 		GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'dot' only accept floating-point inputs");
-		return detail::compute_dot<tvec1, T, highp>::call(x, y);
+		return x * y;
 	}
 
 	template <typename T, precision P, template <typename, precision> class vecType>

+ 1 - 2
glm/detail/type_vec1.hpp

@@ -82,13 +82,12 @@ namespace glm
 		GLM_FUNC_DECL tvec1(tvec1<T, P> const & v);
 		template <precision Q>
 		GLM_FUNC_DECL tvec1(tvec1<T, Q> const & v);
-		template <typename U>
-		GLM_FUNC_DECL tvec1(U const & s);
 
 		//////////////////////////////////////
 		// Explicit basic constructors
 
 		GLM_FUNC_DECL explicit tvec1(ctor);
+		GLM_FUNC_DECL explicit tvec1(T const & s);
 
 		//////////////////////////////////////
 		// Conversion vector constructors

+ 5 - 6
glm/detail/type_vec1.inl

@@ -78,12 +78,6 @@ namespace glm
 		x(v.x)
 	{}
 
-	template <typename T, precision P>
-	template <typename U>
-	GLM_FUNC_QUALIFIER  tvec1<T, P>::tvec1(U const & s) :
-		x(static_cast<T>(s))
-	{}
-
 	//////////////////////////////////////
 	// Explicit basic constructors
 
@@ -91,6 +85,11 @@ namespace glm
 	GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(ctor)
 	{}
 
+	template <typename T, precision P>
+	GLM_FUNC_QUALIFIER  tvec1<T, P>::tvec1(T const & s) :
+		x(s)
+	{}
+
 	//////////////////////////////////////
 	// Conversion vector constructors