|
|
@@ -99,35 +99,35 @@ namespace glm
|
|
|
{}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(T const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(T s)
|
|
|
: x(s), y(s), z(s), w(s)
|
|
|
{}
|
|
|
|
|
|
#if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2)
|
|
|
template <>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4(float const & s) :
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4(float s) :
|
|
|
data(_mm_set1_ps(s))
|
|
|
{}
|
|
|
|
|
|
template <>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4(float const & s) :
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4(float s) :
|
|
|
data(_mm_set1_ps(s))
|
|
|
{}
|
|
|
#endif
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(T const & a, T const & b, T const & c, T const & d)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(T a, T b, T c, T d)
|
|
|
: x(a), y(b), z(c), w(d)
|
|
|
{}
|
|
|
|
|
|
#if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2)
|
|
|
template <>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4(float const & a, float const & b, float const & c, float const & d) :
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4(float a, float b, float c, float d) :
|
|
|
data(_mm_set_ps(d, c, b, a))
|
|
|
{}
|
|
|
|
|
|
template <>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4(float const & a, float const & b, float const & c, float const & d) :
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4(float a, float b, float c, float d) :
|
|
|
data(_mm_set_ps(d, c, b, a))
|
|
|
{}
|
|
|
#endif
|
|
|
@@ -137,7 +137,7 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename A, typename B, typename C, typename D>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(A const & a, B const & b, C const & c, D const & d) :
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(A a, B b, C c, D d) :
|
|
|
x(static_cast<T>(a)),
|
|
|
y(static_cast<T>(b)),
|
|
|
z(static_cast<T>(c)),
|
|
|
@@ -158,7 +158,7 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename A, typename B, typename C, precision Q>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec2<A, Q> const & a, B const & b, C const & c) :
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec2<A, Q> const & a, B b, C c) :
|
|
|
x(static_cast<T>(a.x)),
|
|
|
y(static_cast<T>(a.y)),
|
|
|
z(static_cast<T>(b)),
|
|
|
@@ -176,7 +176,7 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename A, typename B, typename C, precision Q>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(A const & s1, tvec2<B, Q> const & v, C const & s2) :
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(A s1, tvec2<B, Q> const & v, C s2) :
|
|
|
x(static_cast<T>(s1)),
|
|
|
y(static_cast<T>(v.x)),
|
|
|
z(static_cast<T>(v.y)),
|
|
|
@@ -194,7 +194,7 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename A, typename B, typename C, precision Q>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(A const & s1, B const & s2, tvec2<C, Q> const & v) :
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(A s1, B s2, tvec2<C, Q> const & v) :
|
|
|
x(static_cast<T>(s1)),
|
|
|
y(static_cast<T>(s2)),
|
|
|
z(static_cast<T>(v.x)),
|
|
|
@@ -212,7 +212,7 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename A, typename B, precision Q>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec3<A, Q> const & a, B const & b) :
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec3<A, Q> const & a, B b) :
|
|
|
x(static_cast<T>(a.x)),
|
|
|
y(static_cast<T>(a.y)),
|
|
|
z(static_cast<T>(a.z)),
|
|
|
@@ -230,7 +230,7 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename A, typename B, precision Q>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(A const & a, tvec3<B, Q> const & b) :
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(A a, tvec3<B, Q> const & b) :
|
|
|
x(static_cast<T>(a)),
|
|
|
y(static_cast<T>(b.x)),
|
|
|
z(static_cast<T>(b.y)),
|
|
|
@@ -280,74 +280,75 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+=(U s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+=(U scalar)
|
|
|
{
|
|
|
- this->x += static_cast<T>(s);
|
|
|
- this->y += static_cast<T>(s);
|
|
|
- this->z += static_cast<T>(s);
|
|
|
- this->w += static_cast<T>(s);
|
|
|
+ this->x += static_cast<T>(scalar);
|
|
|
+ this->y += static_cast<T>(scalar);
|
|
|
+ this->z += static_cast<T>(scalar);
|
|
|
+ this->w += static_cast<T>(scalar);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
#if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2)
|
|
|
template <>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=(U s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=(U scalar)
|
|
|
{
|
|
|
- this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(s)));
|
|
|
+ this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(scalar)));
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
template <>
|
|
|
template <>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=<float>(float s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=<float>(float scalar)
|
|
|
{
|
|
|
- this->data = _mm_add_ps(this->data, _mm_set_ps1(s));
|
|
|
+ this->data = _mm_add_ps(this->data, _mm_set_ps1(scalar));
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
template <>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=(U s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=(U scalar)
|
|
|
{
|
|
|
- this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(s)));
|
|
|
+ this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(scalar)));
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
template <>
|
|
|
template <>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=<float>(float s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=<float>(float scalar)
|
|
|
{
|
|
|
- this->data = _mm_add_ps(this->data, _mm_set_ps1(s));
|
|
|
+ this->data = _mm_add_ps(this->data, _mm_set_ps1(scalar));
|
|
|
return *this;
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+=(tvec1<U, P> const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+=(tvec1<U, P> const & v)
|
|
|
{
|
|
|
- this->x += static_cast<T>(s);
|
|
|
- this->y += static_cast<T>(s);
|
|
|
- this->z += static_cast<T>(s);
|
|
|
- this->w += static_cast<T>(s);
|
|
|
+ T const scalar = static_cast<T>(v.x);
|
|
|
+ this->x += scalar;
|
|
|
+ this->y += scalar;
|
|
|
+ this->z += scalar;
|
|
|
+ this->w += scalar;
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
#if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2)
|
|
|
template <>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=(tvec1<U, lowp> const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=(tvec1<U, lowp> const & v)
|
|
|
{
|
|
|
- this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(s)));
|
|
|
+ this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(v.x)));
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
template <>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=(tvec1<U, mediump> const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=(tvec1<U, mediump> const & v)
|
|
|
{
|
|
|
- this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(s)));
|
|
|
+ this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(v.x)));
|
|
|
return *this;
|
|
|
}
|
|
|
#endif
|
|
|
@@ -365,12 +366,12 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-=(U s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-=(U scalar)
|
|
|
{
|
|
|
- this->x -= static_cast<T>(s);
|
|
|
- this->y -= static_cast<T>(s);
|
|
|
- this->z -= static_cast<T>(s);
|
|
|
- this->w -= static_cast<T>(s);
|
|
|
+ this->x -= static_cast<T>(scalar);
|
|
|
+ this->y -= static_cast<T>(scalar);
|
|
|
+ this->z -= static_cast<T>(scalar);
|
|
|
+ this->w -= static_cast<T>(scalar);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
@@ -378,10 +379,11 @@ namespace glm
|
|
|
template <typename U>
|
|
|
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-=(tvec1<U, P> const & v)
|
|
|
{
|
|
|
- this->x -= static_cast<T>(v.x);
|
|
|
- this->y -= static_cast<T>(v.x);
|
|
|
- this->z -= static_cast<T>(v.x);
|
|
|
- this->w -= static_cast<T>(v.x);
|
|
|
+ T const scalar = static_cast<T>(v.x);
|
|
|
+ this->x -= scalar;
|
|
|
+ this->y -= scalar;
|
|
|
+ this->z -= scalar;
|
|
|
+ this->w -= scalar;
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
@@ -506,12 +508,12 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%=(U s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%=(U scalar)
|
|
|
{
|
|
|
- this->x %= static_cast<T>(s);
|
|
|
- this->y %= static_cast<T>(s);
|
|
|
- this->z %= static_cast<T>(s);
|
|
|
- this->w %= static_cast<T>(s);
|
|
|
+ this->x %= static_cast<T>(scalar);
|
|
|
+ this->y %= static_cast<T>(scalar);
|
|
|
+ this->z %= static_cast<T>(scalar);
|
|
|
+ this->w %= static_cast<T>(scalar);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
@@ -539,12 +541,12 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator&=(U s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator&=(U scalar)
|
|
|
{
|
|
|
- this->x &= static_cast<T>(s);
|
|
|
- this->y &= static_cast<T>(s);
|
|
|
- this->z &= static_cast<T>(s);
|
|
|
- this->w &= static_cast<T>(s);
|
|
|
+ this->x &= static_cast<T>(scalar);
|
|
|
+ this->y &= static_cast<T>(scalar);
|
|
|
+ this->z &= static_cast<T>(scalar);
|
|
|
+ this->w &= static_cast<T>(scalar);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
@@ -572,12 +574,12 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator|=(U s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator|=(U scalar)
|
|
|
{
|
|
|
- this->x |= static_cast<T>(s);
|
|
|
- this->y |= static_cast<T>(s);
|
|
|
- this->z |= static_cast<T>(s);
|
|
|
- this->w |= static_cast<T>(s);
|
|
|
+ this->x |= static_cast<T>(scalar);
|
|
|
+ this->y |= static_cast<T>(scalar);
|
|
|
+ this->z |= static_cast<T>(scalar);
|
|
|
+ this->w |= static_cast<T>(scalar);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
@@ -605,12 +607,12 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator^=(U s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator^=(U scalar)
|
|
|
{
|
|
|
- this->x ^= static_cast<T>(s);
|
|
|
- this->y ^= static_cast<T>(s);
|
|
|
- this->z ^= static_cast<T>(s);
|
|
|
- this->w ^= static_cast<T>(s);
|
|
|
+ this->x ^= static_cast<T>(scalar);
|
|
|
+ this->y ^= static_cast<T>(scalar);
|
|
|
+ this->z ^= static_cast<T>(scalar);
|
|
|
+ this->w ^= static_cast<T>(scalar);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
@@ -638,12 +640,12 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator<<=(U s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator<<=(U scalar)
|
|
|
{
|
|
|
- this->x <<= static_cast<T>(s);
|
|
|
- this->y <<= static_cast<T>(s);
|
|
|
- this->z <<= static_cast<T>(s);
|
|
|
- this->w <<= static_cast<T>(s);
|
|
|
+ this->x <<= static_cast<T>(scalar);
|
|
|
+ this->y <<= static_cast<T>(scalar);
|
|
|
+ this->z <<= static_cast<T>(scalar);
|
|
|
+ this->w <<= static_cast<T>(scalar);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
@@ -671,12 +673,12 @@ namespace glm
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
template <typename U>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator>>=(U s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator>>=(U scalar)
|
|
|
{
|
|
|
- this->x >>= static_cast<T>(s);
|
|
|
- this->y >>= static_cast<T>(s);
|
|
|
- this->z >>= static_cast<T>(s);
|
|
|
- this->w >>= static_cast<T>(s);
|
|
|
+ this->x >>= static_cast<T>(scalar);
|
|
|
+ this->y >>= static_cast<T>(scalar);
|
|
|
+ this->z >>= static_cast<T>(scalar);
|
|
|
+ this->w >>= static_cast<T>(scalar);
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
@@ -721,23 +723,23 @@ namespace glm
|
|
|
// Binary arithmetic operators
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v, T const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v, T scalar)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- v.x + s,
|
|
|
- v.y + s,
|
|
|
- v.z + s,
|
|
|
- v.w + s);
|
|
|
+ v.x + scalar,
|
|
|
+ v.y + scalar,
|
|
|
+ v.z + scalar,
|
|
|
+ v.w + scalar);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator+(T const & s, tvec4<T, P> const & v)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator+(T scalar, tvec4<T, P> const & v)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- s + v.x,
|
|
|
- s + v.y,
|
|
|
- s + v.z,
|
|
|
- s + v.w);
|
|
|
+ scalar + v.x,
|
|
|
+ scalar + v.y,
|
|
|
+ scalar + v.z,
|
|
|
+ scalar + v.w);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
@@ -752,23 +754,23 @@ namespace glm
|
|
|
|
|
|
//operator-
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v, T const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v, T scalar)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- v.x - s,
|
|
|
- v.y - s,
|
|
|
- v.z - s,
|
|
|
- v.w - s);
|
|
|
+ v.x - scalar,
|
|
|
+ v.y - scalar,
|
|
|
+ v.z - scalar,
|
|
|
+ v.w - scalar);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator-(T const & s, tvec4<T, P> const & v)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator-(T scalar, tvec4<T, P> const & v)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- s - v.x,
|
|
|
- s - v.y,
|
|
|
- s - v.z,
|
|
|
- s - v.w);
|
|
|
+ scalar - v.x,
|
|
|
+ scalar - v.y,
|
|
|
+ scalar - v.z,
|
|
|
+ scalar - v.w);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
@@ -783,23 +785,23 @@ namespace glm
|
|
|
|
|
|
//operator*
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v, T const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v, T scalar)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- v.x * s,
|
|
|
- v.y * s,
|
|
|
- v.z * s,
|
|
|
- v.w * s);
|
|
|
+ v.x * scalar,
|
|
|
+ v.y * scalar,
|
|
|
+ v.z * scalar,
|
|
|
+ v.w * scalar);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator*(T const & s, tvec4<T, P> const & v)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator*(T scalar, tvec4<T, P> const & v)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- s * v.x,
|
|
|
- s * v.y,
|
|
|
- s * v.z,
|
|
|
- s * v.w);
|
|
|
+ scalar * v.x,
|
|
|
+ scalar * v.y,
|
|
|
+ scalar * v.z,
|
|
|
+ scalar * v.w);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
@@ -814,23 +816,23 @@ namespace glm
|
|
|
|
|
|
//operator/
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v, T const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v, T scalar)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- v.x / s,
|
|
|
- v.y / s,
|
|
|
- v.z / s,
|
|
|
- v.w / s);
|
|
|
+ v.x / scalar,
|
|
|
+ v.y / scalar,
|
|
|
+ v.z / scalar,
|
|
|
+ v.w / scalar);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator/(T const & s, tvec4<T, P> const & v)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator/(T scalar, tvec4<T, P> const & v)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- s / v.x,
|
|
|
- s / v.y,
|
|
|
- s / v.z,
|
|
|
- s / v.w);
|
|
|
+ scalar / v.x,
|
|
|
+ scalar / v.y,
|
|
|
+ scalar / v.z,
|
|
|
+ scalar / v.w);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
@@ -858,7 +860,7 @@ namespace glm
|
|
|
// Binary bit operators
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator%(tvec4<T, P> const & v, T const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator%(tvec4<T, P> const & v, T s)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
v.x % s,
|
|
|
@@ -878,7 +880,7 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator%(T const & s, tvec4<T, P> const & v)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator%(T s, tvec4<T, P> const & v)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
s % v.x,
|
|
|
@@ -908,7 +910,7 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator&(tvec4<T, P> const & v, T const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator&(tvec4<T, P> const & v, T s)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
v.x & s,
|
|
|
@@ -928,7 +930,7 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator&(T const & s, tvec4<T, P> const & v)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator&(T s, tvec4<T, P> const & v)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
s & v.x,
|
|
|
@@ -958,7 +960,7 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator|(tvec4<T, P> const & v, T const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator|(tvec4<T, P> const & v, T s)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
v.x | s,
|
|
|
@@ -978,7 +980,7 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator|(T const & s, tvec4<T, P> const & v)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator|(T s, tvec4<T, P> const & v)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
s | v.x,
|
|
|
@@ -1008,7 +1010,7 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator^(tvec4<T, P> const & v, T const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator^(tvec4<T, P> const & v, T s)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
v.x ^ s,
|
|
|
@@ -1028,13 +1030,13 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator^(T const & s, tvec4<T, P> const & v)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator^(T scalar, tvec4<T, P> const & v)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- s ^ v.x,
|
|
|
- s ^ v.y,
|
|
|
- s ^ v.z,
|
|
|
- s ^ v.w);
|
|
|
+ scalar ^ v.x,
|
|
|
+ scalar ^ v.y,
|
|
|
+ scalar ^ v.z,
|
|
|
+ scalar ^ v.w);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
@@ -1058,13 +1060,13 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(tvec4<T, P> const & v, T const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(tvec4<T, P> const & left, T scalar)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- v.x << s,
|
|
|
- v.y << s,
|
|
|
- v.z << s,
|
|
|
- v.w << s);
|
|
|
+ v.x << scalar,
|
|
|
+ v.y << scalar,
|
|
|
+ v.z << scalar,
|
|
|
+ v.w << scalar);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
@@ -1078,13 +1080,13 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(T const & s, tvec4<T, P> const & v)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(T scalar, tvec4<T, P> const & v)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- s << v.x,
|
|
|
- s << v.y,
|
|
|
- s << v.z,
|
|
|
- s << v.w);
|
|
|
+ scalar << v.x,
|
|
|
+ scalar << v.y,
|
|
|
+ scalar << v.z,
|
|
|
+ scalar << v.w);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
@@ -1108,13 +1110,13 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(tvec4<T, P> const & v, T const & s)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(tvec4<T, P> const & v, T scalar)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- v.x >> s,
|
|
|
- v.y >> s,
|
|
|
- v.z >> s,
|
|
|
- v.w >> s);
|
|
|
+ v.x >> scalar,
|
|
|
+ v.y >> scalar,
|
|
|
+ v.z >> scalar,
|
|
|
+ v.w >> scalar);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
@@ -1128,13 +1130,13 @@ namespace glm
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|
|
|
- GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(T const & s, tvec4<T, P> const & v)
|
|
|
+ GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(T scalar, tvec4<T, P> const & v)
|
|
|
{
|
|
|
return tvec4<T, P>(
|
|
|
- s >> v.x,
|
|
|
- s >> v.y,
|
|
|
- s >> v.z,
|
|
|
- s >> v.w);
|
|
|
+ scalar >> v.x,
|
|
|
+ scalar >> v.y,
|
|
|
+ scalar >> v.z,
|
|
|
+ scalar >> v.w);
|
|
|
}
|
|
|
|
|
|
template <typename T, precision P>
|