Fixed vec1 definition

This commit is contained in:
Christophe Riccio 2011-10-18 14:52:17 +01:00
parent be97b8b213
commit 85f2429d0e

View File

@ -165,82 +165,101 @@ namespace detail
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator=
(
tvec1<U> const & v
)
{
this->x = T(v.x);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator+=
(
value_type const & s
U const & s
)
{
this->x += s;
this->x += T(s);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator+=
(
tvec1<T> const & v
tvec1<U> const & v
)
{
this->x += v.x;
this->x += T(v.x);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator-=
(
value_type const & s
U const & s
)
{
this->x -= s;
this->x -= T(s);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator-=
(
tvec1<T> const & v
tvec1<U> const & v
)
{
this->x -= v.x;
this->x -= T(v.x);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator*=
(
value_type const & s
U const & s
)
{
this->x *= s;
this->x *= T(s);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator*=
(
tvec1<T> const & v
tvec1<U> const & v
)
{
this->x *= v.x;
this->x *= T(v.x);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator/=
(
value_type const & s
U const & s
)
{
this->x /= s;
this->x /= T(s);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator/=
(
tvec1<T> const & v
tvec1<U> const & v
)
{
this->x /= v.x;
this->x /= T(v.x);
return *this;
}
@ -285,122 +304,134 @@ namespace detail
// Unary bit operators
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator%=
(
value_type const & s
U const & s
)
{
this->x %= s;
this->x %= T(s);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator%=
(
tvec1<T> const & v
tvec1<U> const & v
)
{
this->x %= v.x;
this->x %= T(v.x);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator&=
(
value_type const & s
U const & s
)
{
this->x &= s;
this->x &= T(s);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator&=
(
tvec1<T> const & v
tvec1<U> const & v
)
{
this->x &= v.x;
this->x &= T(v.x);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator|=
(
value_type const & s
U const & s
)
{
this->x |= s;
this->x |= T(s);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator|=
(
tvec1<T> const & v
tvec1<U> const & v
)
{
this->x |= v.x;
this->x |= U(v.x);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator^=
(
value_type const & s
U const & s
)
{
this->x ^= s;
this->x ^= T(s);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator^=
(
tvec1<T> const & v
tvec1<U> const & v
)
{
this->x ^= v.x;
this->x ^= T(v.x);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator<<=
(
value_type const & s
U const & s
)
{
this->x <<= s;
this->x <<= T(s);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator<<=
(
tvec1<T> const & v
tvec1<U> const & v
)
{
this->x <<= v.x;
this->x <<= T(v.x);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator>>=
(
value_type const & s
U const & s
)
{
this->x >>= s;
this->x >>= T(s);
return *this;
}
template <typename T>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T> & tvec1<T>::operator>>=
(
tvec1<T> const & v
tvec1<U> const & v
)
{
this->x >>= v.x;
this->x >>= T(v.x);
return *this;
}