Fixed *vec1 scalar constructor

This commit is contained in:
Christophe Riccio 2014-10-06 23:35:26 +02:00
parent 3556f4ad85
commit ca4ed31fb6
3 changed files with 7 additions and 9 deletions

View File

@ -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>

View File

@ -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

View File

@ -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