Merge branch '0.9.3' into swizzle

This commit is contained in:
Christophe Riccio 2011-10-18 14:52:46 +01:00
commit b4206636b7

View File

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