Using C++ casts

This commit is contained in:
Christophe Riccio 2013-09-08 00:22:17 +02:00
parent b7c020b6fe
commit b9266c07b0
64 changed files with 966 additions and 1001 deletions

View File

@ -72,7 +72,7 @@
GLM_FUNC_QUALIFIER detail::tvec2<T, P> func \
( \
detail::tvec2<T, P> const & x, \
typename detail::tvec2<T, P>::value_type const & y \
typename detail::tvec2<T, P>::T const & y \
) \
{ \
return detail::tvec2<T, P>( \
@ -85,7 +85,7 @@
GLM_FUNC_QUALIFIER detail::tvec3<T, P> func \
( \
detail::tvec3<T, P> const & x, \
typename detail::tvec3<T, P>::value_type const & y \
typename detail::tvec3<T, P>::T const & y \
) \
{ \
return detail::tvec3<T, P>( \
@ -99,7 +99,7 @@
GLM_FUNC_QUALIFIER detail::tvec4<T, P> func \
( \
detail::tvec4<T, P> const & x, \
typename detail::tvec4<T, P>::value_type const & y \
typename detail::tvec4<T, P>::T const & y \
) \
{ \
return detail::tvec4<T, P>( \

View File

@ -147,7 +147,7 @@ namespace glm
template <typename genType>
GLM_FUNC_DECL genType mod(
genType const & x,
typename genType::value_type const & y);
typename genType::T const & y);
/// Returns the fractional part of x and sets i to the integer
/// part (as a whole number floating point value). Both the
@ -177,7 +177,7 @@ namespace glm
template <typename genType>
GLM_FUNC_DECL genType min(
genType const & x,
typename genType::value_type const & y);
typename genType::T const & y);
/// Returns y if x < y; otherwise, it returns x.
///
@ -193,7 +193,7 @@ namespace glm
template <typename genType>
GLM_FUNC_DECL genType max(
genType const & x,
typename genType::value_type const & y);
typename genType::T const & y);
/// Returns min(max(x, minVal), maxVal) for each component in x
/// using the floating-point values minVal and maxVal.
@ -211,8 +211,8 @@ namespace glm
template <typename genType, precision P>
GLM_FUNC_DECL genType clamp(
genType const & x,
typename genType::value_type const & minVal,
typename genType::value_type const & maxVal);
typename genType::T const & minVal,
typename genType::T const & maxVal);
/// If genTypeU is a floating scalar or vector:
/// Returns x * (1.0 - a) + y * a, i.e., the linear blend of
@ -273,7 +273,7 @@ namespace glm
template <typename genType>
GLM_FUNC_DECL genType step(
typename genType::value_type const & edge,
typename genType::T const & edge,
genType const & x);
/// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and
@ -298,8 +298,8 @@ namespace glm
template <typename genType>
GLM_FUNC_DECL genType smoothstep(
typename genType::value_type const & edge0,
typename genType::value_type const & edge1,
typename genType::T const & edge0,
typename genType::T const & edge1,
genType const & x);
/// Returns true if x holds a NaN (not a number)

View File

@ -346,8 +346,8 @@ namespace detail
GLM_FUNC_QUALIFIER detail::tvec3<T, P> clamp
(
detail::tvec3<T, P> const & x,
typename detail::tvec3<T, P>::value_type const & minVal,
typename detail::tvec3<T, P>::value_type const & maxVal
typename detail::tvec3<T, P>::T const & minVal,
typename detail::tvec3<T, P>::T const & maxVal
)
{
return detail::tvec3<T, P>(
@ -360,8 +360,8 @@ namespace detail
GLM_FUNC_QUALIFIER detail::tvec4<T, P> clamp
(
detail::tvec4<T, P> const & x,
typename detail::tvec4<T, P>::value_type const & minVal,
typename detail::tvec4<T, P>::value_type const & maxVal
typename detail::tvec4<T, P>::T const & minVal,
typename detail::tvec4<T, P>::T const & maxVal
)
{
return detail::tvec4<T, P>(
@ -656,7 +656,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec2<T, P> step
(
typename detail::tvec2<T, P>::value_type const & edge,
typename detail::tvec2<T, P>::T const & edge,
detail::tvec2<T, P> const & x
)
{
@ -668,7 +668,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<T, P> step
(
typename detail::tvec3<T, P>::value_type const & edge,
typename detail::tvec3<T, P>::T const & edge,
detail::tvec3<T, P> const & x
)
{
@ -681,7 +681,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec4<T, P> step
(
typename detail::tvec4<T, P>::value_type const & edge,
typename detail::tvec4<T, P>::T const & edge,
detail::tvec4<T, P> const & x
)
{
@ -947,14 +947,7 @@ namespace detail
GLM_FUNC_QUALIFIER int floatBitsToInt(float const & value)
{
union
{
float f;
int i;
} fi;
fi.f = value;
return fi.i;
return *reinterpret_cast<int*>(const_cast<float*>(&value));
}
GLM_FUNC_QUALIFIER detail::tvec2<int, defaultp> floatBitsToInt
@ -992,14 +985,7 @@ namespace detail
GLM_FUNC_QUALIFIER uint floatBitsToUint(float const & value)
{
union
{
float f;
uint u;
} fu;
fu.f = value;
return fu.u;
return *reinterpret_cast<uint*>(const_cast<float*>(&value));
}
GLM_FUNC_QUALIFIER detail::tvec2<uint, defaultp> floatBitsToUint
@ -1037,14 +1023,7 @@ namespace detail
GLM_FUNC_QUALIFIER float intBitsToFloat(int const & value)
{
union
{
float f;
int i;
} fi;
fi.i = value;
return fi.f;
return *reinterpret_cast<float*>(const_cast<int*>(&value));
}
GLM_FUNC_QUALIFIER detail::tvec2<float, defaultp> intBitsToFloat
@ -1083,14 +1062,7 @@ namespace detail
GLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & value)
{
union
{
float f;
uint u;
} fu;
fu.u = value;
return fu.f;
return *reinterpret_cast<float*>(const_cast<uint*>(&value));
}
GLM_FUNC_QUALIFIER detail::tvec2<float, defaultp> uintBitsToFloat

View File

@ -128,7 +128,7 @@ namespace glm
GLM_FUNC_DECL genType refract(
genType const & I,
genType const & N,
typename genType::value_type const & eta);
typename genType::T const & eta);
/// @}
}//namespace glm

View File

@ -295,7 +295,7 @@ namespace glm
(
genType const & I,
genType const & N,
typename genType::value_type const & eta
typename genType::T const & eta
)
{
//It could be a vector

View File

@ -101,14 +101,14 @@ namespace glm
// Gradients: 41 points uniformly over a line, mapped onto a diamond.
// The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)
detail::tvec3<T, P> x = T(2) * fract(p * C.w) - T(1);
detail::tvec3<T, P> x = static_cast<T>(2) * fract(p * C.w) - T(1);
detail::tvec3<T, P> h = abs(x) - T(0.5);
detail::tvec3<T, P> ox = floor(x + T(0.5));
detail::tvec3<T, P> a0 = x - ox;
// Normalise gradients implicitly by scaling m
// Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h );
m *= T(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h);
m *= static_cast<T>(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h);
// Compute final noise value at P
detail::tvec3<T, P> g;
@ -152,7 +152,7 @@ namespace glm
// Gradients: 7x7 points over a square, mapped onto an octahedron.
// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)
T n_ = T(0.142857142857); // 1.0/7.0
T n_ = static_cast<T>(0.142857142857); // 1.0/7.0
detail::tvec3<T, P> ns(n_ * detail::tvec3<T, P>(D.w, D.y, D.z) - detail::tvec3<T, P>(D.x, D.z, D.x));
detail::tvec4<T, P> j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7)
@ -204,7 +204,7 @@ namespace glm
-0.447213595499958); // -1 + 4 * G4
// (sqrt(5) - 1)/4 = F4, used once below
T const F4 = T(0.309016994374947451);
T const F4 = static_cast<T>(0.309016994374947451);
// First corner
detail::tvec4<T, P> i = floor(v + dot(v, detail::tvec4<T, P>(F4)));
@ -219,17 +219,17 @@ namespace glm
// i0.x = dot(isX, vec3(1.0));
//i0.x = isX.x + isX.y + isX.z;
//i0.yzw = T(1) - isX;
//i0.yzw = static_cast<T>(1) - isX;
i0 = detail::tvec4<T, P>(isX.x + isX.y + isX.z, T(1) - isX);
// i0.y += dot(isYZ.xy, vec2(1.0));
i0.y += isYZ.x + isYZ.y;
//i0.zw += 1.0 - detail::tvec2<T, P>(isYZ.x, isYZ.y);
i0.z += T(1) - isYZ.x;
i0.w += T(1) - isYZ.y;
i0.z += static_cast<T>(1) - isYZ.x;
i0.w += static_cast<T>(1) - isYZ.y;
i0.z += isYZ.z;
i0.w += T(1) - isYZ.z;
i0.w += static_cast<T>(1) - isYZ.z;
// i0 now contains the unique values 0,1,2,3 in each channel
detail::tvec4<T, P> i3 = clamp(i0, T(0), T(1));

View File

@ -45,17 +45,9 @@ namespace glm
GLM_FUNC_QUALIFIER uint32 packSnorm2x16(vec2 const & v)
{
union iu
{
int16 i;
uint16 u;
} A, B;
vec2 Unpack = round(clamp(v ,-1.0f, 1.0f) * 32767.0f);
A.i = detail::int16(Unpack.x);
B.i = detail::int16(Unpack.y);
uint32 Pack = (uint32(B.u) << 16) | (uint32(A.u) << 0);
return Pack;
i16vec2 Unpack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));
u32vec2 Topack(*reinterpret_cast<u16vec2*>(&Unpack));
return (Topack.x << 16) | (Topack.y << 0);
}
GLM_FUNC_QUALIFIER vec2 unpackSnorm2x16(uint32 const & p)

View File

@ -132,7 +132,7 @@ namespace detail
base();
base(class_type const & m);
explicit base(value_type const & x);
explicit base(T const & x);
explicit base(value_type const * const x);
explicit base(col_type const * const x);
@ -149,13 +149,13 @@ namespace detail
//////////////////////////////////////
// Unary updatable operators
class_type& operator= (class_type const & x);
class_type& operator+= (value_type const & x);
class_type& operator+= (T const & x);
class_type& operator+= (class_type const & x);
class_type& operator-= (value_type const & x);
class_type& operator-= (T const & x);
class_type& operator-= (class_type const & x);
class_type& operator*= (value_type const & x);
class_type& operator*= (T const & x);
class_type& operator*= (class_type const & x);
class_type& operator/= (value_type const & x);
class_type& operator/= (T const & x);
class_type& operator/= (class_type const & x);
class_type& operator++ ();
class_type& operator-- ();

View File

@ -97,7 +97,7 @@ base<vT, cT, rT, pT>::base
template <typename vT, uint cT, uint rT, profile pT>
base<vT, cT, rT, pT>::base
(
typename base<vT, cT, rT, pT>::value_type const & x
typename base<vT, cT, rT, pT>::T const & x
)
{
if(rT == 1) // vector
@ -211,7 +211,7 @@ typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator=
template <typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+=
(
typename base<vT, cT, rT, pT>::value_type const & x
typename base<vT, cT, rT, pT>::T const & x
)
{
typename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();
@ -243,7 +243,7 @@ typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+=
template <typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-=
(
typename base<vT, cT, rT, pT>::value_type const & x
typename base<vT, cT, rT, pT>::T const & x
)
{
typename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();
@ -275,7 +275,7 @@ typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-=
template <typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*=
(
typename base<vT, cT, rT, pT>::value_type const & x
typename base<vT, cT, rT, pT>::T const & x
)
{
typename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();
@ -307,7 +307,7 @@ typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*=
template <typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator/=
(
typename base<vT, cT, rT, pT>::value_type const & x
typename base<vT, cT, rT, pT>::T const & x
)
{
typename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();

View File

@ -72,10 +72,10 @@ namespace detail
GLM_FUNC_DECL explicit tmat2x2(
ctor Null);
GLM_FUNC_DECL explicit tmat2x2(
value_type const & x);
T const & x);
GLM_FUNC_DECL explicit tmat2x2(
value_type const & x1, value_type const & y1,
value_type const & x2, value_type const & y2);
T const & x1, T const & y1,
T const & x2, T const & y2);
GLM_FUNC_DECL explicit tmat2x2(
col_type const & v1,
col_type const & v2);
@ -151,11 +151,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator+ (
tmat2x2<T, P> const & m,
typename tmat2x2<T, P>::value_type const & s);
typename tmat2x2<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator+ (
typename tmat2x2<T, P>::value_type const & s,
typename tmat2x2<T, P>::T const & s,
tmat2x2<T, P> const & m);
template <typename T, precision P>
@ -166,11 +166,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator- (
tmat2x2<T, P> const & m,
typename tmat2x2<T, P>::value_type const & s);
typename tmat2x2<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator- (
typename tmat2x2<T, P>::value_type const & s,
typename tmat2x2<T, P>::T const & s,
tmat2x2<T, P> const & m);
template <typename T, precision P>
@ -181,11 +181,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator* (
tmat2x2<T, P> const & m,
typename tmat2x2<T, P>::value_type const & s);
typename tmat2x2<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator* (
typename tmat2x2<T, P>::value_type const & s,
typename tmat2x2<T, P>::T const & s,
tmat2x2<T, P> const & m);
template <typename T, precision P>
@ -216,11 +216,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator/ (
tmat2x2<T, P> const & m,
typename tmat2x2<T, P>::value_type const & s);
typename tmat2x2<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator/ (
typename tmat2x2<T, P>::value_type const & s,
typename tmat2x2<T, P>::T const & s,
tmat2x2<T, P> const & m);
template <typename T, precision P>

View File

@ -111,7 +111,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
(
value_type const & s
T const & s
)
{
value_type const Zero(0);
@ -122,8 +122,8 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
(
value_type const & x0, value_type const & y0,
value_type const & x1, value_type const & y1
T const & x0, T const & y0,
T const & x1, T const & y1
)
{
this->value[0] = col_type(x0, y0);
@ -151,7 +151,7 @@ namespace detail
)
{
value_type const Zero(0);
this->value[0] = tvec2<T, P>(value_type(s), Zero);
this->value[0] = tvec2<T, P>(static_cast<T>(s), Zero);
this->value[1] = tvec2<T, P>(Zero, value_type(s));
}
@ -163,8 +163,8 @@ namespace detail
X2 const & x2, Y2 const & y2
)
{
this->value[0] = col_type(value_type(x1), value_type(y1));
this->value[1] = col_type(value_type(x2), value_type(y2));
this->value[0] = col_type(static_cast<T>(x1), value_type(y1));
this->value[1] = col_type(static_cast<T>(x2), value_type(y2));
}
template <typename T, precision P>
@ -444,7 +444,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+
(
tmat2x2<T, P> const & m,
typename tmat2x2<T, P>::value_type const & s
typename tmat2x2<T, P>::T const & s
)
{
return tmat2x2<T, P>(
@ -455,7 +455,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+
(
typename tmat2x2<T, P>::value_type const & s,
typename tmat2x2<T, P>::T const & s,
tmat2x2<T, P> const & m
)
{
@ -480,7 +480,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-
(
tmat2x2<T, P> const & m,
typename tmat2x2<T, P>::value_type const & s
typename tmat2x2<T, P>::T const & s
)
{
return tmat2x2<T, P>(
@ -491,7 +491,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-
(
typename tmat2x2<T, P>::value_type const & s,
typename tmat2x2<T, P>::T const & s,
tmat2x2<T, P> const & m
)
{
@ -516,7 +516,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*
(
tmat2x2<T, P> const & m,
typename tmat2x2<T, P>::value_type const & s
typename tmat2x2<T, P>::T const & s
)
{
return tmat2x2<T, P>(
@ -527,7 +527,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*
(
typename tmat2x2<T, P>::value_type const & s,
typename tmat2x2<T, P>::T const & s,
tmat2x2<T, P> const & m
)
{
@ -612,7 +612,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/
(
tmat2x2<T, P> const & m,
typename tmat2x2<T, P>::value_type const & s
typename tmat2x2<T, P>::T const & s
)
{
return tmat2x2<T, P>(
@ -623,7 +623,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/
(
typename tmat2x2<T, P>::value_type const & s,
typename tmat2x2<T, P>::T const & s,
tmat2x2<T, P> const & m
)
{

View File

@ -65,10 +65,10 @@ namespace detail
GLM_FUNC_DECL explicit tmat2x3(
ctor);
GLM_FUNC_DECL explicit tmat2x3(
value_type const & s);
T const & s);
GLM_FUNC_DECL explicit tmat2x3(
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1);
T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1);
GLM_FUNC_DECL explicit tmat2x3(
col_type const & v0,
col_type const & v1);
@ -140,7 +140,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator+ (
tmat2x3<T, P> const & m,
typename tmat2x3<T, P>::value_type const & s);
typename tmat2x3<T, P>::T const & s);
template <typename T, precision P>
tmat2x3<T, P> operator+ (
@ -150,7 +150,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator- (
tmat2x3<T, P> const & m,
typename tmat2x3<T, P>::value_type const & s);
typename tmat2x3<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator- (
@ -160,11 +160,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator* (
tmat2x3<T, P> const & m,
typename tmat2x3<T, P>::value_type const & s);
typename tmat2x3<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator* (
typename tmat2x3<T, P>::value_type const & s,
typename tmat2x3<T, P>::T const & s,
tmat2x3<T, P> const & m);
template <typename T, precision P>
@ -195,11 +195,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator/ (
tmat2x3<T, P> const & m,
typename tmat2x3<T, P>::value_type const & s);
typename tmat2x3<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator/ (
typename tmat2x3<T, P>::value_type const & s,
typename tmat2x3<T, P>::T const & s,
tmat2x3<T, P> const & m);
// Unary constant operators

View File

@ -111,7 +111,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3
(
value_type const & s
T const & s
)
{
this->value[0] = col_type(s, T(0), T(0));
@ -121,8 +121,8 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3
(
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1
T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1
)
{
this->value[0] = col_type(x0, y0, z0);
@ -150,7 +150,7 @@ namespace detail
)
{
value_type const Zero(0);
this->value[0] = tvec3<T, P>(value_type(s), Zero, Zero);
this->value[0] = tvec3<T, P>(static_cast<T>(s), Zero, Zero);
this->value[1] = tvec3<T, P>(Zero, value_type(s), Zero);
}
@ -164,8 +164,8 @@ namespace detail
X2 const & x2, Y2 const & y2, Z2 const & z2
)
{
this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1));
this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2));
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));
this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));
}
template <typename T, precision P>
@ -421,7 +421,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator+
(
tmat2x3<T, P> const & m,
typename tmat2x3<T, P>::value_type const & s
typename tmat2x3<T, P>::T const & s
)
{
return tmat2x3<T, P>(
@ -445,7 +445,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator-
(
tmat2x3<T, P> const & m,
typename tmat2x3<T, P>::value_type const & s
typename tmat2x3<T, P>::T const & s
)
{
return tmat2x3<T, P>(
@ -469,7 +469,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*
(
tmat2x3<T, P> const & m,
typename tmat2x3<T, P>::value_type const & s
typename tmat2x3<T, P>::T const & s
)
{
return tmat2x3<T, P>(
@ -480,7 +480,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*
(
typename tmat2x3<T, P>::value_type const & s,
typename tmat2x3<T, P>::T const & s,
tmat2x3<T, P> const & m
)
{
@ -588,7 +588,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator/
(
tmat2x3<T, P> const & m,
typename tmat2x3<T, P>::value_type const & s
typename tmat2x3<T, P>::T const & s
)
{
return tmat2x3<T, P>(
@ -599,7 +599,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator/
(
typename tmat2x3<T, P>::value_type const & s,
typename tmat2x3<T, P>::T const & s,
tmat2x3<T, P> const & m
)
{

View File

@ -65,10 +65,10 @@ namespace detail
GLM_FUNC_DECL explicit tmat2x4(
ctor);
GLM_FUNC_DECL explicit tmat2x4(
value_type const & s);
T const & s);
GLM_FUNC_DECL explicit tmat2x4(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1);
T const & x0, T const & y0, T const & z0, T const & w0,
T const & x1, T const & y1, T const & z1, T const & w1);
GLM_FUNC_DECL explicit tmat2x4(
col_type const & v0,
col_type const & v1);
@ -142,7 +142,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator+ (
tmat2x4<T, P> const & m,
typename tmat2x4<T, P>::value_type const & s);
typename tmat2x4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator+ (
@ -152,7 +152,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator- (
tmat2x4<T, P> const & m,
typename tmat2x4<T, P>::value_type const & s);
typename tmat2x4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator- (
@ -162,11 +162,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator* (
tmat2x4<T, P> const & m,
typename tmat2x4<T, P>::value_type const & s);
typename tmat2x4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator* (
typename tmat2x4<T, P>::value_type const & s,
typename tmat2x4<T, P>::T const & s,
tmat2x4<T, P> const & m);
template <typename T, precision P>
@ -197,11 +197,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator/ (
tmat2x4<T, P> const & m,
typename tmat2x4<T, P>::value_type const & s);
typename tmat2x4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator/ (
typename tmat2x4<T, P>::value_type const & s,
typename tmat2x4<T, P>::T const & s,
tmat2x4<T, P> const & m);
// Unary constant operators

View File

@ -113,7 +113,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4
(
value_type const & s
T const & s
)
{
value_type const Zero(0);
@ -124,8 +124,8 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4
(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1
T const & x0, T const & y0, T const & z0, T const & w0,
T const & x1, T const & y1, T const & z1, T const & w1
)
{
this->value[0] = col_type(x0, y0, z0, w0);
@ -153,7 +153,7 @@ namespace detail
)
{
value_type const Zero(0);
this->value[0] = tvec4<T, P>(value_type(s), Zero, Zero, Zero);
this->value[0] = tvec4<T, P>(static_cast<T>(s), Zero, Zero, Zero);
this->value[1] = tvec4<T, P>(Zero, value_type(s), Zero, Zero);
}
@ -167,8 +167,8 @@ namespace detail
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2
)
{
this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1));
this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2));
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));
this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));
}
template <typename T, precision P>
@ -424,7 +424,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator+
(
tmat2x4<T, P> const & m,
typename tmat2x4<T, P>::value_type const & s
typename tmat2x4<T, P>::T const & s
)
{
return tmat2x4<T, P>(
@ -448,7 +448,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator-
(
tmat2x4<T, P> const & m,
typename tmat2x4<T, P>::value_type const & s
typename tmat2x4<T, P>::T const & s
)
{
return tmat2x4<T, P>(
@ -472,7 +472,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*
(
tmat2x4<T, P> const & m,
typename tmat2x4<T, P>::value_type const & s
typename tmat2x4<T, P>::T const & s
)
{
return tmat2x4<T, P>(
@ -483,7 +483,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*
(
typename tmat2x4<T, P>::value_type const & s,
typename tmat2x4<T, P>::T const & s,
tmat2x4<T, P> const & m
)
{
@ -607,7 +607,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator/
(
tmat2x4<T, P> const & m,
typename tmat2x4<T, P>::value_type const & s
typename tmat2x4<T, P>::T const & s
)
{
return tmat2x4<T, P>(
@ -618,7 +618,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator/
(
typename tmat2x4<T, P>::value_type const & s,
typename tmat2x4<T, P>::T const & s,
tmat2x4<T, P> const & m
)
{

View File

@ -65,11 +65,11 @@ namespace detail
GLM_FUNC_DECL explicit tmat3x2(
ctor);
GLM_FUNC_DECL explicit tmat3x2(
value_type const & s);
T const & s);
GLM_FUNC_DECL explicit tmat3x2(
value_type const & x0, value_type const & y0,
value_type const & x1, value_type const & y1,
value_type const & x2, value_type const & y2);
T const & x0, T const & y0,
T const & x1, T const & y1,
T const & x2, T const & y2);
GLM_FUNC_DECL explicit tmat3x2(
col_type const & v0,
col_type const & v1,
@ -145,7 +145,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator+ (
tmat3x2<T, P> const & m,
typename tmat3x2<T, P>::value_type const & s);
typename tmat3x2<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator+ (
@ -155,7 +155,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator- (
tmat3x2<T, P> const & m,
typename tmat3x2<T, P>::value_type const & s);
typename tmat3x2<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator- (
@ -165,11 +165,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator* (
tmat3x2<T, P> const & m,
typename tmat3x2<T, P>::value_type const & s);
typename tmat3x2<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator* (
typename tmat3x2<T, P>::value_type const & s,
typename tmat3x2<T, P>::T const & s,
tmat3x2<T, P> const & m);
template <typename T, precision P>
@ -200,11 +200,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator/ (
tmat3x2<T, P> const & m,
typename tmat3x2<T, P>::value_type const & s);
typename tmat3x2<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator/ (
typename tmat3x2<T, P>::value_type const & s,
typename tmat3x2<T, P>::T const & s,
tmat3x2<T, P> const & m);
// Unary constant operators

View File

@ -114,7 +114,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
(
value_type const & s
T const & s
)
{
this->value[0] = col_type(s, 0);
@ -125,9 +125,9 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
(
value_type const & x0, value_type const & y0,
value_type const & x1, value_type const & y1,
value_type const & x2, value_type const & y2
T const & x0, T const & y0,
T const & x1, T const & y1,
T const & x2, T const & y2
)
{
this->value[0] = col_type(x0, y0);
@ -158,7 +158,7 @@ namespace detail
)
{
value_type const Zero(0);
this->value[0] = tvec2<T, P>(value_type(s), Zero);
this->value[0] = tvec2<T, P>(static_cast<T>(s), Zero);
this->value[1] = tvec2<T, P>(Zero, value_type(s));
this->value[2] = tvec2<T, P>(Zero);
}
@ -175,9 +175,9 @@ namespace detail
X3 const & x3, Y3 const & y3
)
{
this->value[0] = col_type(value_type(x1), value_type(y1));
this->value[1] = col_type(value_type(x2), value_type(y2));
this->value[2] = col_type(value_type(x3), value_type(y3));
this->value[0] = col_type(static_cast<T>(x1), value_type(y1));
this->value[1] = col_type(static_cast<T>(x2), value_type(y2));
this->value[2] = col_type(static_cast<T>(x3), value_type(y3));
}
template <typename T, precision P>
@ -454,7 +454,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator+
(
tmat3x2<T, P> const & m,
typename tmat3x2<T, P>::value_type const & s
typename tmat3x2<T, P>::T const & s
)
{
return tmat3x2<T, P>(
@ -480,7 +480,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator-
(
tmat3x2<T, P> const & m,
typename tmat3x2<T, P>::value_type const & s
typename tmat3x2<T, P>::T const & s
)
{
return tmat3x2<T, P>(
@ -506,7 +506,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*
(
tmat3x2<T, P> const & m,
typename tmat3x2<T, P>::value_type const & s
typename tmat3x2<T, P>::T const & s
)
{
return tmat3x2<T, P>(
@ -518,7 +518,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*
(
typename tmat3x2<T, P>::value_type const & s,
typename tmat3x2<T, P>::T const & s,
tmat3x2<T, P> const & m
)
{
@ -618,7 +618,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator/
(
tmat3x2<T, P> const & m,
typename tmat3x2<T, P>::value_type const & s
typename tmat3x2<T, P>::T const & s
)
{
return tmat3x2<T, P>(
@ -630,7 +630,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator/
(
typename tmat3x2<T, P>::value_type const & s,
typename tmat3x2<T, P>::T const & s,
tmat3x2<T, P> const & m
)
{

View File

@ -71,11 +71,11 @@ namespace detail
GLM_FUNC_DECL explicit tmat3x3(
ctor Null);
GLM_FUNC_DECL explicit tmat3x3(
value_type const & s);
T const & s);
GLM_FUNC_DECL explicit tmat3x3(
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1,
value_type const & x2, value_type const & y2, value_type const & z2);
T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1,
T const & x2, T const & y2, T const & z2);
GLM_FUNC_DECL explicit tmat3x3(
col_type const & v0,
col_type const & v1,
@ -153,11 +153,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator+ (
tmat3x3<T, P> const & m,
typename tmat3x3<T, P>::value_type const & s);
typename tmat3x3<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator+ (
typename tmat3x3<T, P>::value_type const & s,
typename tmat3x3<T, P>::T const & s,
tmat3x3<T, P> const & m);
template <typename T, precision P>
@ -168,11 +168,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator- (
tmat3x3<T, P> const & m,
typename tmat3x3<T, P>::value_type const & s);
typename tmat3x3<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator- (
typename tmat3x3<T, P>::value_type const & s,
typename tmat3x3<T, P>::T const & s,
tmat3x3<T, P> const & m);
template <typename T, precision P>
@ -183,11 +183,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator* (
tmat3x3<T, P> const & m,
typename tmat3x3<T, P>::value_type const & s);
typename tmat3x3<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator* (
typename tmat3x3<T, P>::value_type const & s,
typename tmat3x3<T, P>::T const & s,
tmat3x3<T, P> const & m);
template <typename T, precision P>
@ -218,11 +218,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator/ (
tmat3x3<T, P> const & m,
typename tmat3x3<T, P>::value_type const & s);
typename tmat3x3<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator/ (
typename tmat3x3<T, P>::value_type const & s,
typename tmat3x3<T, P>::T const & s,
tmat3x3<T, P> const & m);
template <typename T, precision P>

View File

@ -116,7 +116,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
(
value_type const & s
T const & s
)
{
value_type const Zero(0);
@ -128,9 +128,9 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
(
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1,
value_type const & x2, value_type const & y2, value_type const & z2
T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1,
T const & x2, T const & y2, T const & z2
)
{
this->value[0] = col_type(x0, y0, z0);
@ -161,7 +161,7 @@ namespace detail
)
{
value_type const Zero(0);
this->value[0] = tvec3<T, P>(value_type(s), Zero, Zero);
this->value[0] = tvec3<T, P>(static_cast<T>(s), Zero, Zero);
this->value[1] = tvec3<T, P>(Zero, value_type(s), Zero);
this->value[2] = tvec3<T, P>(Zero, Zero, value_type(s));
}
@ -178,9 +178,9 @@ namespace detail
X3 const & x3, Y3 const & y3, Z3 const & z3
)
{
this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1));
this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2));
this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3));
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));
this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));
this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3));
}
template <typename T, precision P>
@ -512,7 +512,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+
(
tmat3x3<T, P> const & m,
typename tmat3x3<T, P>::value_type const & s
typename tmat3x3<T, P>::T const & s
)
{
return tmat3x3<T, P>(
@ -524,7 +524,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+
(
typename tmat3x3<T, P>::value_type const & s,
typename tmat3x3<T, P>::T const & s,
tmat3x3<T, P> const & m
)
{
@ -551,7 +551,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-
(
tmat3x3<T, P> const & m,
typename tmat3x3<T, P>::value_type const & s
typename tmat3x3<T, P>::T const & s
)
{
return tmat3x3<T, P>(
@ -563,7 +563,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-
(
typename tmat3x3<T, P>::value_type const & s,
typename tmat3x3<T, P>::T const & s,
tmat3x3<T, P> const & m
)
{
@ -590,7 +590,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*
(
tmat3x3<T, P> const & m,
typename tmat3x3<T, P>::value_type const & s
typename tmat3x3<T, P>::T const & s
)
{
return tmat3x3<T, P>(
@ -602,7 +602,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*
(
typename tmat3x3<T, P>::value_type const & s,
typename tmat3x3<T, P>::T const & s,
tmat3x3<T, P> const & m
)
{
@ -720,7 +720,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator/
(
tmat3x3<T, P> const & m,
typename tmat3x3<T, P>::value_type const & s
typename tmat3x3<T, P>::T const & s
)
{
return tmat3x3<T, P>(
@ -732,7 +732,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator/
(
typename tmat3x3<T, P>::value_type const & s,
typename tmat3x3<T, P>::T const & s,
tmat3x3<T, P> const & m
)
{

View File

@ -65,11 +65,11 @@ namespace detail
GLM_FUNC_DECL explicit tmat3x4(
ctor Null);
GLM_FUNC_DECL explicit tmat3x4(
value_type const & s);
T const & s);
GLM_FUNC_DECL explicit tmat3x4(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2);
T const & x0, T const & y0, T const & z0, T const & w0,
T const & x1, T const & y1, T const & z1, T const & w1,
T const & x2, T const & y2, T const & z2, T const & w2);
GLM_FUNC_DECL explicit tmat3x4(
col_type const & v0,
col_type const & v1,
@ -145,7 +145,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator+ (
tmat3x4<T, P> const & m,
typename tmat3x4<T, P>::value_type const & s);
typename tmat3x4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator+ (
@ -155,7 +155,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator- (
tmat3x4<T, P> const & m,
typename tmat3x4<T, P>::value_type const & s);
typename tmat3x4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator- (
@ -165,11 +165,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator* (
tmat3x4<T, P> const & m,
typename tmat3x4<T, P>::value_type const & s);
typename tmat3x4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator* (
typename tmat3x4<T, P>::value_type const & s,
typename tmat3x4<T, P>::T const & s,
tmat3x4<T, P> const & m);
template <typename T, precision P>
@ -200,11 +200,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator/ (
tmat3x4<T, P> const & m,
typename tmat3x4<T, P>::value_type const & s);
typename tmat3x4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator/ (
typename tmat3x4<T, P>::value_type const & s,
typename tmat3x4<T, P>::T const & s,
tmat3x4<T, P> const & m);
// Unary constant operators

View File

@ -114,7 +114,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
(
value_type const & s
T const & s
)
{
value_type const Zero(0);
@ -126,9 +126,9 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2
T const & x0, T const & y0, T const & z0, T const & w0,
T const & x1, T const & y1, T const & z1, T const & w1,
T const & x2, T const & y2, T const & z2, T const & w2
)
{
this->value[0] = col_type(x0, y0, z0, w0);
@ -159,7 +159,7 @@ namespace detail
)
{
value_type const Zero(0);
this->value[0] = tvec4<T, P>(value_type(s), Zero, Zero, Zero);
this->value[0] = tvec4<T, P>(static_cast<T>(s), Zero, Zero, Zero);
this->value[1] = tvec4<T, P>(Zero, value_type(s), Zero, Zero);
this->value[2] = tvec4<T, P>(Zero, Zero, value_type(s), Zero);
}
@ -176,9 +176,9 @@ namespace detail
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3
)
{
this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1));
this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2));
this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3));
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));
this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));
this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3));
}
template <typename T, precision P>
@ -453,7 +453,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator+
(
tmat3x4<T, P> const & m,
typename tmat3x4<T, P>::value_type const & s
typename tmat3x4<T, P>::T const & s
)
{
return tmat3x4<T, P>(
@ -479,7 +479,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator-
(
tmat3x4<T, P> const & m,
typename tmat3x4<T, P>::value_type const & s
typename tmat3x4<T, P>::T const & s
)
{
return tmat3x4<T, P>(
@ -505,7 +505,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*
(
tmat3x4<T, P> const & m,
typename tmat3x4<T, P>::value_type const & s
typename tmat3x4<T, P>::T const & s
)
{
return tmat3x4<T, P>(
@ -517,7 +517,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*
(
typename tmat3x4<T, P>::value_type const & s,
typename tmat3x4<T, P>::T const & s,
tmat3x4<T, P> const & m
)
{
@ -651,7 +651,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator/
(
tmat3x4<T, P> const & m,
typename tmat3x4<T, P>::value_type const & s
typename tmat3x4<T, P>::T const & s
)
{
return tmat3x4<T, P>(
@ -663,7 +663,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator/
(
typename tmat3x4<T, P>::value_type const & s,
typename tmat3x4<T, P>::T const & s,
tmat3x4<T, P> const & m
)
{

View File

@ -65,12 +65,12 @@ namespace detail
GLM_FUNC_DECL explicit tmat4x2(
ctor Null);
GLM_FUNC_DECL explicit tmat4x2(
value_type const & x);
T const & x);
GLM_FUNC_DECL explicit tmat4x2(
value_type const & x0, value_type const & y0,
value_type const & x1, value_type const & y1,
value_type const & x2, value_type const & y2,
value_type const & x3, value_type const & y3);
T const & x0, T const & y0,
T const & x1, T const & y1,
T const & x2, T const & y2,
T const & x3, T const & y3);
GLM_FUNC_DECL explicit tmat4x2(
col_type const & v0,
col_type const & v1,
@ -150,7 +150,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator+ (
tmat4x2<T, P> const & m,
typename tmat4x2<T, P>::value_type const & s);
typename tmat4x2<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator+ (
@ -160,7 +160,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator- (
tmat4x2<T, P> const & m,
typename tmat4x2<T, P>::value_type const & s);
typename tmat4x2<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator- (
@ -170,11 +170,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator* (
tmat4x2<T, P> const & m,
typename tmat4x2<T, P>::value_type const & s);
typename tmat4x2<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator* (
typename tmat4x2<T, P>::value_type const & s,
typename tmat4x2<T, P>::T const & s,
tmat4x2<T, P> const & m);
template <typename T, precision P>
@ -205,11 +205,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator/ (
tmat4x2<T, P> const & m,
typename tmat4x2<T, P>::value_type const & s);
typename tmat4x2<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator/ (
typename tmat4x2<T, P>::value_type const & s,
typename tmat4x2<T, P>::T const & s,
tmat4x2<T, P> const & m);
// Unary constant operators

View File

@ -114,7 +114,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
(
value_type const & s
T const & s
)
{
value_type const Zero(0);
@ -127,10 +127,10 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
(
value_type const & x0, value_type const & y0,
value_type const & x1, value_type const & y1,
value_type const & x2, value_type const & y2,
value_type const & x3, value_type const & y3
T const & x0, T const & y0,
T const & x1, T const & y1,
T const & x2, T const & y2,
T const & x3, T const & y3
)
{
this->value[0] = col_type(x0, y0);
@ -164,7 +164,7 @@ namespace detail
)
{
value_type const Zero(0);
this->value[0] = tvec2<T, P>(value_type(s), Zero);
this->value[0] = tvec2<T, P>(static_cast<T>(s), Zero);
this->value[1] = tvec2<T, P>(Zero, value_type(s));
this->value[2] = tvec2<T, P>(Zero, Zero);
this->value[3] = tvec2<T, P>(Zero, Zero);
@ -184,10 +184,10 @@ namespace detail
X4 const & x4, Y4 const & y4
)
{
this->value[0] = col_type(value_type(x1), value_type(y1));
this->value[1] = col_type(value_type(x2), value_type(y2));
this->value[2] = col_type(value_type(x3), value_type(y3));
this->value[3] = col_type(value_type(x4), value_type(y4));
this->value[0] = col_type(static_cast<T>(x1), value_type(y1));
this->value[1] = col_type(static_cast<T>(x2), value_type(y2));
this->value[2] = col_type(static_cast<T>(x3), value_type(y3));
this->value[3] = col_type(static_cast<T>(x4), value_type(y4));
}
template <typename T, precision P>
@ -228,8 +228,8 @@ namespace detail
{
this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]);
this->value[2] = col_type(value_type(0));
this->value[3] = col_type(value_type(0));
this->value[2] = col_type(static_cast<T>(0));
this->value[3] = col_type(static_cast<T>(0));
}
template <typename T, precision P>
@ -241,7 +241,7 @@ namespace detail
this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]);
this->value[2] = col_type(m[2]);
this->value[3] = col_type(value_type(0));
this->value[3] = col_type(static_cast<T>(0));
}
template <typename T, precision P>
@ -264,8 +264,8 @@ namespace detail
{
this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]);
this->value[2] = col_type(value_type(0));
this->value[3] = col_type(value_type(0));
this->value[2] = col_type(static_cast<T>(0));
this->value[3] = col_type(static_cast<T>(0));
}
template <typename T, precision P>
@ -277,7 +277,7 @@ namespace detail
this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]);
this->value[2] = col_type(m[2]);
this->value[3] = col_type(value_type(0));
this->value[3] = col_type(static_cast<T>(0));
}
template <typename T, precision P>
@ -288,8 +288,8 @@ namespace detail
{
this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]);
this->value[2] = col_type(value_type(0));
this->value[3] = col_type(value_type(0));
this->value[2] = col_type(static_cast<T>(0));
this->value[3] = col_type(static_cast<T>(0));
}
template <typename T, precision P>
@ -313,7 +313,7 @@ namespace detail
this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]);
this->value[2] = col_type(m[2]);
this->value[3] = col_type(value_type(0));
this->value[3] = col_type(static_cast<T>(0));
}
//////////////////////////////////////////////////////////////
@ -483,7 +483,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator+
(
tmat4x2<T, P> const & m,
typename tmat4x2<T, P>::value_type const & s
typename tmat4x2<T, P>::T const & s
)
{
return tmat4x2<T, P>(
@ -511,7 +511,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator-
(
tmat4x2<T, P> const & m,
typename tmat4x2<T, P>::value_type const & s
typename tmat4x2<T, P>::T const & s
)
{
return tmat4x2<T, P>(
@ -539,7 +539,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*
(
tmat4x2<T, P> const & m,
typename tmat4x2<T, P>::value_type const & s
typename tmat4x2<T, P>::T const & s
)
{
return tmat4x2<T, P>(
@ -552,7 +552,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*
(
typename tmat4x2<T, P>::value_type const & s,
typename tmat4x2<T, P>::T const & s,
tmat4x2<T, P> const & m
)
{
@ -660,7 +660,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator/
(
tmat4x2<T, P> const & m,
typename tmat4x2<T, P>::value_type const & s
typename tmat4x2<T, P>::T const & s
)
{
return tmat4x2<T, P>(
@ -673,7 +673,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator/
(
typename tmat4x2<T, P>::value_type const & s,
typename tmat4x2<T, P>::T const & s,
tmat4x2<T, P> const & m
)
{

View File

@ -65,12 +65,12 @@ namespace detail
GLM_FUNC_DECL explicit tmat4x3(
ctor Null);
GLM_FUNC_DECL explicit tmat4x3(
value_type const & x);
T const & x);
GLM_FUNC_DECL explicit tmat4x3(
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1,
value_type const & x2, value_type const & y2, value_type const & z2,
value_type const & x3, value_type const & y3, value_type const & z3);
T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1,
T const & x2, T const & y2, T const & z2,
T const & x3, T const & y3, T const & z3);
GLM_FUNC_DECL explicit tmat4x3(
col_type const & v0,
col_type const & v1,
@ -150,7 +150,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator+ (
tmat4x3<T, P> const & m,
typename tmat4x3<T, P>::value_type const & s);
typename tmat4x3<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator+ (
@ -160,7 +160,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator- (
tmat4x3<T, P> const & m,
typename tmat4x3<T, P>::value_type const & s);
typename tmat4x3<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator- (
@ -170,11 +170,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator* (
tmat4x3<T, P> const & m,
typename tmat4x3<T, P>::value_type const & s);
typename tmat4x3<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator* (
typename tmat4x3<T, P>::value_type const & s,
typename tmat4x3<T, P>::T const & s,
tmat4x3<T, P> const & m);
template <typename T, precision P>
@ -205,11 +205,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator/ (
tmat4x3<T, P> const & m,
typename tmat4x3<T, P>::value_type const & s);
typename tmat4x3<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator/ (
typename tmat4x3<T, P>::value_type const & s,
typename tmat4x3<T, P>::T const & s,
tmat4x3<T, P> const & m);
// Unary constant operators

View File

@ -113,7 +113,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(
value_type const & s)
T const & s)
{
value_type const Zero(0);
this->value[0] = col_type(s, Zero, Zero);
@ -125,10 +125,10 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
(
value_type const & x0, value_type const & y0, value_type const & z0,
value_type const & x1, value_type const & y1, value_type const & z1,
value_type const & x2, value_type const & y2, value_type const & z2,
value_type const & x3, value_type const & y3, value_type const & z3
T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1,
T const & x2, T const & y2, T const & z2,
T const & x3, T const & y3, T const & z3
)
{
this->value[0] = col_type(x0, y0, z0);
@ -162,7 +162,7 @@ namespace detail
)
{
value_type const Zero(0);
this->value[0] = tvec3<T, P>(value_type(s), Zero, Zero);
this->value[0] = tvec3<T, P>(static_cast<T>(s), Zero, Zero);
this->value[1] = tvec3<T, P>(Zero, value_type(s), Zero);
this->value[2] = tvec3<T, P>(Zero, Zero, value_type(s));
this->value[3] = tvec3<T, P>(Zero, Zero, Zero);
@ -182,10 +182,10 @@ namespace detail
X4 const & x4, Y4 const & y4, Z4 const & z4
)
{
this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1));
this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2));
this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3));
this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4));
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));
this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));
this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3));
this->value[3] = col_type(static_cast<T>(x4), value_type(y4), value_type(z4));
}
template <typename T, precision P>
@ -229,7 +229,7 @@ namespace detail
this->value[0] = col_type(m[0], value_type(0));
this->value[1] = col_type(m[1], value_type(0));
this->value[2] = col_type(m[2], value_type(1));
this->value[3] = col_type(value_type(0));
this->value[3] = col_type(static_cast<T>(0));
}
template <typename T, precision P>
@ -241,7 +241,7 @@ namespace detail
this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]);
this->value[2] = col_type(m[2]);
this->value[3] = col_type(value_type(0));
this->value[3] = col_type(static_cast<T>(0));
}
template <typename T, precision P>
@ -264,8 +264,8 @@ namespace detail
{
this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]);
this->value[2] = col_type(value_type(0), value_type(0), value_type(1));
this->value[3] = col_type(value_type(0));
this->value[2] = col_type(static_cast<T>(0), value_type(0), value_type(1));
this->value[3] = col_type(static_cast<T>(0));
}
template <typename T, precision P>
@ -277,7 +277,7 @@ namespace detail
this->value[0] = col_type(m[0], value_type(0));
this->value[1] = col_type(m[1], value_type(0));
this->value[2] = col_type(m[2], value_type(1));
this->value[3] = col_type(value_type(0));
this->value[3] = col_type(static_cast<T>(0));
}
template <typename T, precision P>
@ -288,8 +288,8 @@ namespace detail
{
this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]);
this->value[2] = col_type(value_type(0), value_type(0), value_type(1));
this->value[3] = col_type(value_type(0));
this->value[2] = col_type(static_cast<T>(0), value_type(0), value_type(1));
this->value[3] = col_type(static_cast<T>(0));
}
template <typename T, precision P>
@ -313,7 +313,7 @@ namespace detail
this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]);
this->value[2] = col_type(m[2]);
this->value[3] = col_type(value_type(0));
this->value[3] = col_type(static_cast<T>(0));
}
//////////////////////////////////////////////////////////////
@ -466,7 +466,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x3<T, P> operator+ (
tmat4x3<T, P> const & m,
typename tmat4x3<T, P>::value_type const & s)
typename tmat4x3<T, P>::T const & s)
{
return tmat4x3<T, P>(
m[0] + s,
@ -490,7 +490,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x3<T, P> operator- (
tmat4x3<T, P> const & m,
typename tmat4x3<T, P>::value_type const & s)
typename tmat4x3<T, P>::T const & s)
{
return tmat4x3<T, P>(
m[0] - s,
@ -514,7 +514,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x3<T, P> operator* (
tmat4x3<T, P> const & m,
typename tmat4x3<T, P>::value_type const & s)
typename tmat4x3<T, P>::T const & s)
{
return tmat4x3<T, P>(
m[0] * s,
@ -525,7 +525,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x3<T, P> operator* (
typename tmat4x3<T, P>::value_type const & s,
typename tmat4x3<T, P>::T const & s,
tmat4x3<T, P> const & m)
{
return tmat4x3<T, P>(
@ -648,7 +648,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat4x3<T, P> operator/
(
tmat4x3<T, P> const & m,
typename tmat4x3<T, P>::value_type const & s
typename tmat4x3<T, P>::T const & s
)
{
return tmat4x3<T, P>(
@ -661,7 +661,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x3<T, P> operator/
(
typename tmat4x3<T, P>::value_type const & s,
typename tmat4x3<T, P>::T const & s,
tmat4x3<T, P> const & m
)
{

View File

@ -71,12 +71,12 @@ namespace detail
GLM_FUNC_DECL explicit tmat4x4(
ctor Null);
GLM_FUNC_DECL explicit tmat4x4(
value_type const & x);
T const & x);
GLM_FUNC_DECL explicit tmat4x4(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2,
value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3);
T const & x0, T const & y0, T const & z0, T const & w0,
T const & x1, T const & y1, T const & z1, T const & w1,
T const & x2, T const & y2, T const & z2, T const & w2,
T const & x3, T const & y3, T const & z3, T const & w3);
GLM_FUNC_DECL explicit tmat4x4(
col_type const & v0,
col_type const & v1,
@ -158,11 +158,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator+ (
tmat4x4<T, P> const & m,
typename tmat4x4<T, P>::value_type const & s);
typename tmat4x4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator+ (
typename tmat4x4<T, P>::value_type const & s,
typename tmat4x4<T, P>::T const & s,
tmat4x4<T, P> const & m);
template <typename T, precision P>
@ -173,11 +173,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator- (
tmat4x4<T, P> const & m,
typename tmat4x4<T, P>::value_type const & s);
typename tmat4x4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator- (
typename tmat4x4<T, P>::value_type const & s,
typename tmat4x4<T, P>::T const & s,
tmat4x4<T, P> const & m);
template <typename T, precision P>
@ -188,11 +188,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator* (
tmat4x4<T, P> const & m,
typename tmat4x4<T, P>::value_type const & s);
typename tmat4x4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator* (
typename tmat4x4<T, P>::value_type const & s,
typename tmat4x4<T, P>::T const & s,
tmat4x4<T, P> const & m);
template <typename T, precision P>
@ -223,11 +223,11 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator/ (
tmat4x4<T, P> const & m,
typename tmat4x4<T, P>::value_type const & s);
typename tmat4x4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator/ (
typename tmat4x4<T, P>::value_type const & s,
typename tmat4x4<T, P>::T const & s,
tmat4x4<T, P> const & m);
template <typename T, precision P>

View File

@ -121,7 +121,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
(
value_type const & s
T const & s
)
{
value_type const Zero(0);
@ -134,10 +134,10 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
(
value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0,
value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1,
value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2,
value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3
T const & x0, T const & y0, T const & z0, T const & w0,
T const & x1, T const & y1, T const & z1, T const & w1,
T const & x2, T const & y2, T const & z2, T const & w2,
T const & x3, T const & y3, T const & z3, T const & w3
)
{
this->value[0] = col_type(x0, y0, z0, w0);
@ -186,7 +186,7 @@ namespace detail
GLM_STATIC_ASSERT(detail::type<U>::is_float || std::numeric_limits<U>::is_integer, "*mat4x4 constructor only takes float and integer types");
value_type const Zero(0);
this->value[0] = tvec4<T, P>(value_type(s), Zero, Zero, Zero);
this->value[0] = tvec4<T, P>(static_cast<T>(s), Zero, Zero, Zero);
this->value[1] = tvec4<T, P>(Zero, value_type(s), Zero, Zero);
this->value[2] = tvec4<T, P>(Zero, Zero, value_type(s), Zero);
this->value[3] = tvec4<T, P>(Zero, Zero, Zero, value_type(s));
@ -226,10 +226,10 @@ namespace detail
GLM_STATIC_ASSERT(detail::type<Z4>::is_float || std::numeric_limits<Z4>::is_integer, "*mat4x4 constructor only takes float and integer types, 15th parameter type invalid.");
GLM_STATIC_ASSERT(detail::type<W4>::is_float || std::numeric_limits<W4>::is_integer, "*mat4x4 constructor only takes float and integer types, 16th parameter type invalid.");
this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1));
this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2));
this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3));
this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4), value_type(w4));
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));
this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));
this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3));
this->value[3] = col_type(static_cast<T>(x4), value_type(y4), value_type(z4), value_type(w4));
}
template <typename T, precision P>
@ -263,8 +263,8 @@ namespace detail
{
this->value[0] = col_type(m[0], detail::tvec2<T, P>(0));
this->value[1] = col_type(m[1], detail::tvec2<T, P>(0));
this->value[2] = col_type(value_type(0));
this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1));
this->value[2] = col_type(static_cast<T>(0));
this->value[3] = col_type(static_cast<T>(0), value_type(0), value_type(0), value_type(1));
}
template <typename T, precision P>
@ -276,7 +276,7 @@ namespace detail
this->value[0] = col_type(m[0], value_type(0));
this->value[1] = col_type(m[1], value_type(0));
this->value[2] = col_type(m[2], value_type(0));
this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1));
this->value[3] = col_type(static_cast<T>(0), value_type(0), value_type(0), value_type(1));
}
template <typename T, precision P>
@ -287,8 +287,8 @@ namespace detail
{
this->value[0] = col_type(m[0], value_type(0));
this->value[1] = col_type(m[1], value_type(0));
this->value[2] = col_type(value_type(0));
this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1));
this->value[2] = col_type(static_cast<T>(0));
this->value[3] = col_type(static_cast<T>(0), value_type(0), value_type(0), value_type(1));
}
template <typename T, precision P>
@ -300,7 +300,7 @@ namespace detail
this->value[0] = col_type(m[0], detail::tvec2<T, P>(0));
this->value[1] = col_type(m[1], detail::tvec2<T, P>(0));
this->value[2] = col_type(m[2], detail::tvec2<T, P>(0));
this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1));
this->value[3] = col_type(static_cast<T>(0), value_type(0), value_type(0), value_type(1));
}
template <typename T, precision P>
@ -591,7 +591,7 @@ namespace detail
- this->value[0][0] * SubFactor14 + this->value[0][1] * SubFactor16 - this->value[0][3] * SubFactor18,
+ this->value[0][0] * SubFactor15 - this->value[0][1] * SubFactor17 + this->value[0][2] * SubFactor18);
T Determinant = T(
T Determinant = static_cast<T>(
+ this->value[0][0] * Inverse[0][0]
+ this->value[0][1] * Inverse[1][0]
+ this->value[0][2] * Inverse[2][0]
@ -606,7 +606,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat4x4<T, P> operator+
(
tmat4x4<T, P> const & m,
typename tmat4x4<T, P>::value_type const & s
typename tmat4x4<T, P>::T const & s
)
{
return tmat4x4<T, P>(
@ -619,7 +619,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> operator+
(
typename tmat4x4<T, P>::value_type const & s,
typename tmat4x4<T, P>::T const & s,
tmat4x4<T, P> const & m
)
{
@ -648,7 +648,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat4x4<T, P> operator-
(
tmat4x4<T, P> const & m,
typename tmat4x4<T, P>::value_type const & s
typename tmat4x4<T, P>::T const & s
)
{
return tmat4x4<T, P>(
@ -661,7 +661,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> operator-
(
typename tmat4x4<T, P>::value_type const & s,
typename tmat4x4<T, P>::T const & s,
tmat4x4<T, P> const & m
)
{
@ -703,7 +703,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> operator*
(
typename tmat4x4<T, P>::value_type const & s,
typename tmat4x4<T, P>::T const & s,
tmat4x4<T, P> const & m
)
{
@ -845,7 +845,7 @@ namespace detail
GLM_FUNC_QUALIFIER tmat4x4<T, P> operator/
(
tmat4x4<T, P> const & m,
typename tmat4x4<T, P>::value_type const & s
typename tmat4x4<T, P>::T const & s
)
{
return tmat4x4<T, P>(
@ -858,7 +858,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P> operator/
(
typename tmat4x4<T, P>::value_type const & s,
typename tmat4x4<T, P>::T const & s,
tmat4x4<T, P> const & m
)
{

View File

@ -61,7 +61,7 @@ namespace detail
// Accesses
GLM_FUNC_DECL value_type & operator[](size_type i);
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
GLM_FUNC_DECL T const & operator[](size_type i) const;
//////////////////////////////////////
// Implicit basic constructors
@ -77,7 +77,7 @@ namespace detail
GLM_FUNC_DECL explicit tvec1(
ctor);
GLM_FUNC_DECL explicit tvec1(
value_type const & s);
T const & s);
//////////////////////////////////////
// Swizzle constructors

View File

@ -49,7 +49,7 @@ namespace detail
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tvec1<T, P>::value_type const & tvec1<T, P>::operator[]
GLM_FUNC_QUALIFIER typename tvec1<T, P>::T const & tvec1<T, P>::operator[]
(
size_type i
) const
@ -63,7 +63,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1() :
x(value_type(0))
x(static_cast<T>(0))
{}
template <typename T, precision P>
@ -96,7 +96,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1
(
value_type const & s
T const & s
) :
x(s)
{}
@ -121,7 +121,7 @@ namespace detail
(
U const & s
) :
x(value_type(s))
x(static_cast<T>(s))
{}
//////////////////////////////////////
@ -133,7 +133,7 @@ namespace detail
(
tvec1<U, Q> const & v
) :
x(value_type(v.x))
x(static_cast<T>(v.x))
{}
template <typename T, precision P>
@ -142,7 +142,7 @@ namespace detail
(
tvec2<U, Q> const & v
) :
x(value_type(v.x))
x(static_cast<T>(v.x))
{}
template <typename T, precision P>
@ -151,7 +151,7 @@ namespace detail
(
tvec3<U, Q> const & v
) :
x(value_type(v.x))
x(static_cast<T>(v.x))
{}
template <typename T, precision P>
@ -160,7 +160,7 @@ namespace detail
(
tvec4<U, Q> const & v
) :
x(value_type(v.x))
x(static_cast<T>(v.x))
{}
//////////////////////////////////////
@ -183,7 +183,7 @@ namespace detail
tvec1<U, P> const & v
)
{
this->x = T(v.x);
this->x = static_cast<T>(v.x);
return *this;
}
@ -194,7 +194,7 @@ namespace detail
U const & s
)
{
this->x += T(s);
this->x += static_cast<T>(s);
return *this;
}
@ -205,7 +205,7 @@ namespace detail
tvec1<U, P> const & v
)
{
this->x += T(v.x);
this->x += static_cast<T>(v.x);
return *this;
}
@ -216,7 +216,7 @@ namespace detail
U const & s
)
{
this->x -= T(s);
this->x -= static_cast<T>(s);
return *this;
}
@ -227,7 +227,7 @@ namespace detail
tvec1<U, P> const & v
)
{
this->x -= T(v.x);
this->x -= static_cast<T>(v.x);
return *this;
}
@ -238,7 +238,7 @@ namespace detail
U const & s
)
{
this->x *= T(s);
this->x *= static_cast<T>(s);
return *this;
}
@ -249,7 +249,7 @@ namespace detail
tvec1<U, P> const & v
)
{
this->x *= T(v.x);
this->x *= static_cast<T>(v.x);
return *this;
}
@ -260,7 +260,7 @@ namespace detail
U const & s
)
{
this->x /= T(s);
this->x /= static_cast<T>(s);
return *this;
}
@ -271,7 +271,7 @@ namespace detail
tvec1<U, P> const & v
)
{
this->x /= T(v.x);
this->x /= static_cast<T>(v.x);
return *this;
}
@ -341,7 +341,7 @@ namespace detail
U const & s
)
{
this->x %= T(s);
this->x %= static_cast<T>(s);
return *this;
}
@ -352,7 +352,7 @@ namespace detail
tvec1<U, P> const & v
)
{
this->x %= T(v.x);
this->x %= static_cast<T>(v.x);
return *this;
}
@ -363,7 +363,7 @@ namespace detail
U const & s
)
{
this->x &= T(s);
this->x &= static_cast<T>(s);
return *this;
}
@ -374,7 +374,7 @@ namespace detail
tvec1<U, P> const & v
)
{
this->x &= T(v.x);
this->x &= static_cast<T>(v.x);
return *this;
}
@ -385,7 +385,7 @@ namespace detail
U const & s
)
{
this->x |= T(s);
this->x |= static_cast<T>(s);
return *this;
}
@ -407,7 +407,7 @@ namespace detail
U const & s
)
{
this->x ^= T(s);
this->x ^= static_cast<T>(s);
return *this;
}
@ -418,7 +418,7 @@ namespace detail
tvec1<U, P> const & v
)
{
this->x ^= T(v.x);
this->x ^= static_cast<T>(v.x);
return *this;
}
@ -429,7 +429,7 @@ namespace detail
U const & s
)
{
this->x <<= T(s);
this->x <<= static_cast<T>(s);
return *this;
}
@ -440,7 +440,7 @@ namespace detail
tvec1<U, P> const & v
)
{
this->x <<= T(v.x);
this->x <<= static_cast<T>(v.x);
return *this;
}
@ -451,7 +451,7 @@ namespace detail
U const & s
)
{
this->x >>= T(s);
this->x >>= static_cast<T>(s);
return *this;
}
@ -462,7 +462,7 @@ namespace detail
tvec1<U, P> const & v
)
{
this->x >>= T(v.x);
this->x >>= static_cast<T>(v.x);
return *this;
}
@ -534,7 +534,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec1<T, P> operator+
(
tvec1<T, P> const & v,
typename tvec1<T, P>::value_type const & s
typename tvec1<T, P>::T const & s
)
{
return tvec1<T, P>(
@ -544,7 +544,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator+
(
typename tvec1<T, P>::value_type const & s,
typename tvec1<T, P>::T const & s,
tvec1<T, P> const & v
)
{
@ -568,7 +568,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec1<T, P> operator-
(
tvec1<T, P> const & v,
typename tvec1<T, P>::value_type const & s
typename tvec1<T, P>::T const & s
)
{
return tvec1<T, P>(
@ -578,7 +578,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator-
(
typename tvec1<T, P>::value_type const & s,
typename tvec1<T, P>::T const & s,
tvec1<T, P> const & v
)
{
@ -602,7 +602,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec1<T, P> operator*
(
tvec1<T, P> const & v,
typename tvec1<T, P>::value_type const & s
typename tvec1<T, P>::T const & s
)
{
return tvec1<T, P>(
@ -612,7 +612,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator*
(
typename tvec1<T, P>::value_type const & s,
typename tvec1<T, P>::T const & s,
tvec1<T, P> const & v
)
{
@ -636,7 +636,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec1<T, P> operator/
(
tvec1<T, P> const & v,
typename tvec1<T, P>::value_type const & s
typename tvec1<T, P>::T const & s
)
{
return tvec1<T, P>(
@ -646,7 +646,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator/
(
typename tvec1<T, P>::value_type const & s,
typename tvec1<T, P>::T const & s,
tvec1<T, P> const & v
)
{
@ -705,7 +705,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec1<T, P> operator%
(
tvec1<T, P> const & v,
typename tvec1<T, P>::value_type const & s
typename tvec1<T, P>::T const & s
)
{
return tvec1<T, P>(
@ -715,7 +715,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator%
(
typename tvec1<T, P>::value_type const & s,
typename tvec1<T, P>::T const & s,
tvec1<T, P> const & v
)
{
@ -738,7 +738,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec1<T, P> operator&
(
tvec1<T, P> const & v,
typename tvec1<T, P>::value_type const & s
typename tvec1<T, P>::T const & s
)
{
return tvec1<T, P>(
@ -748,7 +748,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator&
(
typename tvec1<T, P>::value_type const & s,
typename tvec1<T, P>::T const & s,
tvec1<T, P> const & v
)
{
@ -771,7 +771,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec1<T, P> operator|
(
tvec1<T, P> const & v,
typename tvec1<T, P>::value_type const & s
typename tvec1<T, P>::T const & s
)
{
return tvec1<T, P>(
@ -781,7 +781,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator|
(
typename tvec1<T, P>::value_type const & s,
typename tvec1<T, P>::T const & s,
tvec1<T, P> const & v
)
{
@ -804,7 +804,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec1<T, P> operator^
(
tvec1<T, P> const & v,
typename tvec1<T, P>::value_type const & s
typename tvec1<T, P>::T const & s
)
{
return tvec1<T, P>(
@ -814,7 +814,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator^
(
typename tvec1<T, P>::value_type const & s,
typename tvec1<T, P>::T const & s,
tvec1<T, P> const & v
)
{
@ -837,7 +837,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec1<T, P> operator<<
(
tvec1<T, P> const & v,
typename tvec1<T, P>::value_type const & s
typename tvec1<T, P>::T const & s
)
{
return tvec1<T, P>(
@ -847,7 +847,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator<<
(
typename tvec1<T, P>::value_type const & s,
typename tvec1<T, P>::T const & s,
tvec1<T, P> const & v
)
{
@ -870,7 +870,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec1<T, P> operator>>
(
tvec1<T, P> const & v,
typename tvec1<T, P>::value_type const & s
typename tvec1<T, P>::T const & s
)
{
return tvec1<T, P>(
@ -880,7 +880,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator>>
(
typename tvec1<T, P>::value_type const & s,
typename tvec1<T, P>::T const & s,
tvec1<T, P> const & v
)
{

View File

@ -82,7 +82,7 @@ namespace detail
// Accesses
GLM_FUNC_DECL value_type & operator[](size_type i);
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
GLM_FUNC_DECL T const & operator[](size_type i) const;
//////////////////////////////////////
// Implicit basic constructors
@ -98,10 +98,10 @@ namespace detail
GLM_FUNC_DECL explicit tvec2(
ctor);
GLM_FUNC_DECL explicit tvec2(
value_type const & s);
T const & s);
GLM_FUNC_DECL explicit tvec2(
value_type const & s1,
value_type const & s2);
T const & s1,
T const & s2);
//////////////////////////////////////
// Swizzle constructors

View File

@ -57,8 +57,8 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2() :
x(value_type(0)),
y(value_type(0))
x(0),
y(0)
{}
template <typename T, precision P>
@ -93,7 +93,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2
(
value_type const & s
T const & s
) :
x(s),
y(s)
@ -102,8 +102,8 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2
(
value_type const & s1,
value_type const & s2
T const & s1,
T const & s2
) :
x(s1),
y(s2)
@ -130,8 +130,8 @@ namespace detail
(
U const & x
) :
x(value_type(x)),
y(value_type(x))
x(static_cast<T>(x)),
y(static_cast<T>(x))
{}
template <typename T, precision P>
@ -141,8 +141,8 @@ namespace detail
U const & a,
V const & b
) :
x(value_type(a)),
y(value_type(b))
x(static_cast<T>(a)),
y(static_cast<T>(b))
{}
//////////////////////////////////////
@ -154,8 +154,8 @@ namespace detail
(
tvec2<U, Q> const & v
) :
x(value_type(v.x)),
y(value_type(v.y))
x(static_cast<T>(v.x)),
y(static_cast<T>(v.y))
{}
template <typename T, precision P>
@ -164,8 +164,8 @@ namespace detail
(
tvec3<U, Q> const & v
) :
x(value_type(v.x)),
y(value_type(v.y))
x(static_cast<T>(v.x)),
y(static_cast<T>(v.y))
{}
template <typename T, precision P>
@ -174,8 +174,8 @@ namespace detail
(
tvec4<U, Q> const & v
) :
x(value_type(v.x)),
y(value_type(v.y))
x(static_cast<T>(v.x)),
y(static_cast<T>(v.y))
{}
//////////////////////////////////////
@ -199,8 +199,8 @@ namespace detail
tvec2<U, P> const & v
)
{
this->x = T(v.x);
this->y = T(v.y);
this->x = static_cast<T>(v.x);
this->y = static_cast<T>(v.y);
return *this;
}
@ -211,8 +211,8 @@ namespace detail
U const & s
)
{
this->x += T(s);
this->y += T(s);
this->x += static_cast<T>(s);
this->y += static_cast<T>(s);
return *this;
}
@ -223,8 +223,8 @@ namespace detail
tvec2<U, P> const & v
)
{
this->x += T(v.x);
this->y += T(v.y);
this->x += static_cast<T>(v.x);
this->y += static_cast<T>(v.y);
return *this;
}
@ -235,8 +235,8 @@ namespace detail
U const & s
)
{
this->x -= T(s);
this->y -= T(s);
this->x -= static_cast<T>(s);
this->y -= static_cast<T>(s);
return *this;
}
@ -247,8 +247,8 @@ namespace detail
tvec2<U, P> const & v
)
{
this->x -= T(v.x);
this->y -= T(v.y);
this->x -= static_cast<T>(v.x);
this->y -= static_cast<T>(v.y);
return *this;
}
@ -259,8 +259,8 @@ namespace detail
U const & s
)
{
this->x *= T(s);
this->y *= T(s);
this->x *= static_cast<T>(s);
this->y *= static_cast<T>(s);
return *this;
}
@ -271,8 +271,8 @@ namespace detail
tvec2<U, P> const & v
)
{
this->x *= T(v.x);
this->y *= T(v.y);
this->x *= static_cast<T>(v.x);
this->y *= static_cast<T>(v.y);
return *this;
}
@ -283,8 +283,8 @@ namespace detail
U const & s
)
{
this->x /= T(s);
this->y /= T(s);
this->x /= static_cast<T>(s);
this->y /= static_cast<T>(s);
return *this;
}
@ -295,8 +295,8 @@ namespace detail
tvec2<U, P> const & v
)
{
this->x /= T(v.x);
this->y /= T(v.y);
this->x /= static_cast<T>(v.x);
this->y /= static_cast<T>(v.y);
return *this;
}
@ -368,8 +368,8 @@ namespace detail
U const & s
)
{
this->x %= T(s);
this->y %= T(s);
this->x %= static_cast<T>(s);
this->y %= static_cast<T>(s);
return *this;
}
@ -380,8 +380,8 @@ namespace detail
tvec2<U, P> const & v
)
{
this->x %= T(v.x);
this->y %= T(v.y);
this->x %= static_cast<T>(v.x);
this->y %= static_cast<T>(v.y);
return *this;
}
@ -392,8 +392,8 @@ namespace detail
U const & s
)
{
this->x &= T(s);
this->y &= T(s);
this->x &= static_cast<T>(s);
this->y &= static_cast<T>(s);
return *this;
}
@ -404,8 +404,8 @@ namespace detail
tvec2<U, P> const & v
)
{
this->x &= T(v.x);
this->y &= T(v.y);
this->x &= static_cast<T>(v.x);
this->y &= static_cast<T>(v.y);
return *this;
}
@ -416,8 +416,8 @@ namespace detail
U const & s
)
{
this->x |= T(s);
this->y |= T(s);
this->x |= static_cast<T>(s);
this->y |= static_cast<T>(s);
return *this;
}
@ -428,8 +428,8 @@ namespace detail
tvec2<U, P> const & v
)
{
this->x |= T(v.x);
this->y |= T(v.y);
this->x |= static_cast<T>(v.x);
this->y |= static_cast<T>(v.y);
return *this;
}
@ -440,8 +440,8 @@ namespace detail
U const & s
)
{
this->x ^= T(s);
this->y ^= T(s);
this->x ^= static_cast<T>(s);
this->y ^= static_cast<T>(s);
return *this;
}
@ -452,8 +452,8 @@ namespace detail
tvec2<U, P> const & v
)
{
this->x ^= T(v.x);
this->y ^= T(v.y);
this->x ^= static_cast<T>(v.x);
this->y ^= static_cast<T>(v.y);
return *this;
}
@ -464,8 +464,8 @@ namespace detail
U const & s
)
{
this->x <<= T(s);
this->y <<= T(s);
this->x <<= static_cast<T>(s);
this->y <<= static_cast<T>(s);
return *this;
}
@ -476,8 +476,8 @@ namespace detail
tvec2<U, P> const & v
)
{
this->x <<= T(v.x);
this->y <<= T(v.y);
this->x <<= static_cast<T>(v.x);
this->y <<= static_cast<T>(v.y);
return *this;
}
@ -488,8 +488,8 @@ namespace detail
U const & s
)
{
this->x >>= T(s);
this->y >>= T(s);
this->x >>= static_cast<T>(s);
this->y >>= static_cast<T>(s);
return *this;
}
@ -500,8 +500,8 @@ namespace detail
tvec2<U, P> const & v
)
{
this->x >>= T(v.x);
this->y >>= T(v.y);
this->x >>= static_cast<T>(v.x);
this->y >>= static_cast<T>(v.y);
return *this;
}
@ -582,8 +582,8 @@ namespace detail
)
{
return tvec2<T, P>(
v.x + T(s),
v.y + T(s));
v.x + s,
v.y + s);
}
template <typename T, precision P>
@ -594,8 +594,8 @@ namespace detail
)
{
return tvec2<T, P>(
T(s) + v.x,
T(s) + v.y);
s + v.x,
s + v.y);
}
template <typename T, precision P>
@ -606,8 +606,8 @@ namespace detail
)
{
return tvec2<T, P>(
v1.x + T(v2.x),
v1.y + T(v2.y));
v1.x + v2.x,
v1.y + v2.y);
}
//operator-
@ -619,8 +619,8 @@ namespace detail
)
{
return tvec2<T, P>(
v.x - T(s),
v.y - T(s));
v.x - s,
v.y - s);
}
template <typename T, precision P>
@ -631,8 +631,8 @@ namespace detail
)
{
return tvec2<T, P>(
T(s) - v.x,
T(s) - v.y);
s - v.x,
s - v.y);
}
template <typename T, precision P>
@ -643,8 +643,8 @@ namespace detail
)
{
return tvec2<T, P>(
v1.x - T(v2.x),
v1.y - T(v2.y));
v1.x - v2.x,
v1.y - v2.y);
}
//operator*
@ -656,8 +656,8 @@ namespace detail
)
{
return tvec2<T, P>(
v.x * T(s),
v.y * T(s));
v.x * s,
v.y * s);
}
template <typename T, precision P>
@ -668,8 +668,8 @@ namespace detail
)
{
return tvec2<T, P>(
T(s) * v.x,
T(s) * v.y);
s * v.x,
s * v.y);
}
template <typename T, precision P>
@ -680,8 +680,8 @@ namespace detail
)
{
return tvec2<T, P>(
v1.x * T(v2.x),
v1.y * T(v2.y));
v1.x * v2.x,
v1.y * v2.y);
}
//operator/
@ -693,8 +693,8 @@ namespace detail
)
{
return tvec2<T, P>(
v.x / T(s),
v.y / T(s));
v.x / s,
v.y / s);
}
template <typename T, precision P>
@ -705,8 +705,8 @@ namespace detail
)
{
return tvec2<T, P>(
T(s) / v.x,
T(s) / v.y);
s / v.x,
s / v.y);
}
template <typename T, precision P>
@ -717,8 +717,8 @@ namespace detail
)
{
return tvec2<T, P>(
v1.x / T(v2.x),
v1.y / T(v2.y));
v1.x / v2.x,
v1.y / v2.y);
}
// Unary constant operators
@ -744,8 +744,8 @@ namespace detail
)
{
return tvec2<T, P>(
v.x % T(s),
v.y % T(s));
v.x % s,
v.y % s);
}
template <typename T, precision P>
@ -756,8 +756,8 @@ namespace detail
)
{
return tvec2<T, P>(
T(s) % v.x,
T(s) % v.y);
s % v.x,
s % v.y);
}
template <typename T, precision P>
@ -768,8 +768,8 @@ namespace detail
)
{
return tvec2<T, P>(
v1.x % T(v2.x),
v1.y % T(v2.y));
v1.x % v2.x,
v1.y % v2.y);
}
template <typename T, precision P>
@ -780,8 +780,8 @@ namespace detail
)
{
return tvec2<T, P>(
v.x & T(s),
v.y & T(s));
v.x & s,
v.y & s);
}
template <typename T, precision P>
@ -792,8 +792,8 @@ namespace detail
)
{
return tvec2<T, P>(
T(s) & v.x,
T(s) & v.y);
s & v.x,
s & v.y);
}
template <typename T, precision P>
@ -804,8 +804,8 @@ namespace detail
)
{
return tvec2<T, P>(
v1.x & T(v2.x),
v1.y & T(v2.y));
v1.x & v2.x,
v1.y & v2.y);
}
template <typename T, precision P>
@ -816,8 +816,8 @@ namespace detail
)
{
return tvec2<T, P>(
v.x | T(s),
v.y | T(s));
v.x | s,
v.y | s);
}
template <typename T, precision P>
@ -828,8 +828,8 @@ namespace detail
)
{
return tvec2<T, P>(
T(s) | v.x,
T(s) | v.y);
s | v.x,
s | v.y);
}
template <typename T, precision P>
@ -840,8 +840,8 @@ namespace detail
)
{
return tvec2<T, P>(
v1.x | T(v2.x),
v1.y | T(v2.y));
v1.x | v2.x,
v1.y | v2.y);
}
template <typename T, precision P>
@ -852,8 +852,8 @@ namespace detail
)
{
return tvec2<T, P>(
v.x ^ T(s),
v.y ^ T(s));
v.x ^ s,
v.y ^ s);
}
template <typename T, precision P>
@ -864,8 +864,8 @@ namespace detail
)
{
return tvec2<T, P>(
T(s) ^ v.x,
T(s) ^ v.y);
s ^ v.x,
s ^ v.y);
}
template <typename T, precision P>
@ -876,8 +876,8 @@ namespace detail
)
{
return tvec2<T, P>(
v1.x ^ T(v2.x),
v1.y ^ T(v2.y));
v1.x ^ v2.x,
v1.y ^ v2.y);
}
template <typename T, precision P>
@ -888,8 +888,8 @@ namespace detail
)
{
return tvec2<T, P>(
v.x << T(s),
v.y << T(s));
v.x << s,
v.y << s);
}
template <typename T, precision P>
@ -900,8 +900,8 @@ namespace detail
)
{
return tvec2<T, P>(
s << T(v.x),
s << T(v.y));
s << v.x,
s << v.y);
}
template <typename T, precision P>
@ -912,8 +912,8 @@ namespace detail
)
{
return tvec2<T, P>(
v1.x << T(v2.x),
v1.y << T(v2.y));
v1.x << v2.x,
v1.y << v2.y);
}
template <typename T, precision P>
@ -924,8 +924,8 @@ namespace detail
)
{
return tvec2<T, P>(
v.x >> T(s),
v.y >> T(s));
v.x >> s,
v.y >> s);
}
template <typename T, precision P>
@ -936,8 +936,8 @@ namespace detail
)
{
return tvec2<T, P>(
T(s) >> v.x,
T(s) >> v.y);
s >> v.x,
s >> v.y);
}
template <typename T, precision P>
@ -948,8 +948,8 @@ namespace detail
)
{
return tvec2<T, P>(
v1.x >> T(v2.x),
v1.y >> T(v2.y));
v1.x >> v2.x,
v1.y >> v2.y);
}
template <typename T, precision P>

View File

@ -83,7 +83,7 @@ namespace detail
// Accesses
GLM_FUNC_DECL value_type & operator[](size_type i);
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
GLM_FUNC_DECL T const & operator[](size_type i) const;
//////////////////////////////////////
// Implicit basic constructors
@ -99,11 +99,11 @@ namespace detail
GLM_FUNC_DECL explicit tvec3(
ctor);
GLM_FUNC_DECL explicit tvec3(
value_type const & s);
T const & s);
GLM_FUNC_DECL explicit tvec3(
value_type const & s1,
value_type const & s2,
value_type const & s3);
T const & s1,
T const & s2,
T const & s3);
//////////////////////////////////////
// Conversion scalar constructors

View File

@ -57,9 +57,9 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3() :
x(value_type(0)),
y(value_type(0)),
z(value_type(0))
x(0),
y(0),
z(0)
{}
template <typename T, precision P>
@ -96,7 +96,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3
(
value_type const & s
T const & s
) :
x(s),
y(s),
@ -106,9 +106,9 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3
(
value_type const & s0,
value_type const & s1,
value_type const & s2
T const & s0,
T const & s1,
T const & s2
) :
x(s0),
y(s1),
@ -135,9 +135,9 @@ namespace detail
tref2<A, P> const & v,
B const & s
) :
x(value_type(v.x)),
y(value_type(v.y)),
z(value_type(s))
x(static_cast<T>(v.x)),
y(static_cast<T>(v.y)),
z(static_cast<T>(s))
{}
template <typename T, precision P>
@ -147,9 +147,9 @@ namespace detail
A const & s,
tref2<B, P> const & v
) :
x(value_type(s)),
y(value_type(v.x)),
z(value_type(v.y))
x(static_cast<T>(s)),
y(static_cast<T>(v.x)),
z(static_cast<T>(v.y))
{}
//////////////////////////////////////
@ -161,9 +161,9 @@ namespace detail
(
U const & s
) :
x(value_type(s)),
y(value_type(s)),
z(value_type(s))
x(static_cast<T>(s)),
y(static_cast<T>(s)),
z(static_cast<T>(s))
{}
template <typename T, precision P>
@ -174,9 +174,9 @@ namespace detail
B const & y,
C const & z
) :
x(value_type(x)),
y(value_type(y)),
z(value_type(z))
x(static_cast<T>(x)),
y(static_cast<T>(y)),
z(static_cast<T>(z))
{}
//////////////////////////////////////
@ -189,9 +189,9 @@ namespace detail
tvec2<A, Q> const & v,
B const & s
) :
x(value_type(v.x)),
y(value_type(v.y)),
z(value_type(s))
x(static_cast<T>(v.x)),
y(static_cast<T>(v.y)),
z(static_cast<T>(s))
{}
template <typename T, precision P>
@ -201,9 +201,9 @@ namespace detail
A const & s,
tvec2<B, Q> const & v
) :
x(value_type(s)),
y(value_type(v.x)),
z(value_type(v.y))
x(static_cast<T>(s)),
y(static_cast<T>(v.x)),
z(static_cast<T>(v.y))
{}
template <typename T, precision P>
@ -212,9 +212,9 @@ namespace detail
(
tvec3<U, Q> const & v
) :
x(value_type(v.x)),
y(value_type(v.y)),
z(value_type(v.z))
x(static_cast<T>(v.x)),
y(static_cast<T>(v.y)),
z(static_cast<T>(v.z))
{}
template <typename T, precision P>
@ -223,9 +223,9 @@ namespace detail
(
tvec4<U, Q> const & v
) :
x(value_type(v.x)),
y(value_type(v.y)),
z(value_type(v.z))
x(static_cast<T>(v.x)),
y(static_cast<T>(v.y)),
z(static_cast<T>(v.z))
{}
//////////////////////////////////////
@ -250,9 +250,9 @@ namespace detail
tvec3<U, P> const & v
)
{
this->x = T(v.x);
this->y = T(v.y);
this->z = T(v.z);
this->x = static_cast<T>(v.x);
this->y = static_cast<T>(v.y);
this->z = static_cast<T>(v.z);
return *this;
}
@ -263,9 +263,9 @@ namespace detail
U const & s
)
{
this->x += T(s);
this->y += T(s);
this->z += T(s);
this->x += static_cast<T>(s);
this->y += static_cast<T>(s);
this->z += static_cast<T>(s);
return *this;
}
@ -276,9 +276,9 @@ namespace detail
tvec3<U, P> const & v
)
{
this->x += T(v.x);
this->y += T(v.y);
this->z += T(v.z);
this->x += static_cast<T>(v.x);
this->y += static_cast<T>(v.y);
this->z += static_cast<T>(v.z);
return *this;
}
@ -289,9 +289,9 @@ namespace detail
U const & s
)
{
this->x -= T(s);
this->y -= T(s);
this->z -= T(s);
this->x -= static_cast<T>(s);
this->y -= static_cast<T>(s);
this->z -= static_cast<T>(s);
return *this;
}
@ -302,9 +302,9 @@ namespace detail
tvec3<U, P> const & v
)
{
this->x -= T(v.x);
this->y -= T(v.y);
this->z -= T(v.z);
this->x -= static_cast<T>(v.x);
this->y -= static_cast<T>(v.y);
this->z -= static_cast<T>(v.z);
return *this;
}
@ -315,9 +315,9 @@ namespace detail
U const & s
)
{
this->x *= T(s);
this->y *= T(s);
this->z *= T(s);
this->x *= static_cast<T>(s);
this->y *= static_cast<T>(s);
this->z *= static_cast<T>(s);
return *this;
}
@ -328,9 +328,9 @@ namespace detail
tvec3<U, P> const & v
)
{
this->x *= T(v.x);
this->y *= T(v.y);
this->z *= T(v.z);
this->x *= static_cast<T>(v.x);
this->y *= static_cast<T>(v.y);
this->z *= static_cast<T>(v.z);
return *this;
}
@ -341,9 +341,9 @@ namespace detail
U const & s
)
{
this->x /= T(s);
this->y /= T(s);
this->z /= T(s);
this->x /= static_cast<T>(s);
this->y /= static_cast<T>(s);
this->z /= static_cast<T>(s);
return *this;
}
@ -354,9 +354,9 @@ namespace detail
tvec3<U, P> const & v
)
{
this->x /= T(v.x);
this->y /= T(v.y);
this->z /= T(v.z);
this->x /= static_cast<T>(v.x);
this->y /= static_cast<T>(v.y);
this->z /= static_cast<T>(v.z);
return *this;
}
@ -547,9 +547,9 @@ namespace detail
tvec3<U, P> const & v
)
{
this->x <<= T(v.x);
this->y <<= T(v.y);
this->z <<= T(v.z);
this->x <<= static_cast<T>(v.x);
this->y <<= static_cast<T>(v.y);
this->z <<= static_cast<T>(v.z);
return *this;
}
@ -560,9 +560,9 @@ namespace detail
U const & s
)
{
this->x >>= T(s);
this->y >>= T(s);
this->z >>= T(s);
this->x >>= static_cast<T>(s);
this->y >>= static_cast<T>(s);
this->z >>= static_cast<T>(s);
return *this;
}
@ -573,9 +573,9 @@ namespace detail
tvec3<U, P> const & v
)
{
this->x >>= T(v.x);
this->y >>= T(v.y);
this->z >>= T(v.z);
this->x >>= static_cast<T>(v.x);
this->y >>= static_cast<T>(v.y);
this->z >>= static_cast<T>(v.z);
return *this;
}
@ -671,9 +671,9 @@ namespace detail
)
{
return tvec3<T, P>(
v.x + T(s),
v.y + T(s),
v.z + T(s));
v.x + s,
v.y + s,
v.z + s);
}
template <typename T, precision P>
@ -684,9 +684,9 @@ namespace detail
)
{
return tvec3<T, P>(
T(s) + v.x,
T(s) + v.y,
T(s) + v.z);
s + v.x,
s + v.y,
s + v.z);
}
template <typename T, precision P>
@ -697,9 +697,9 @@ namespace detail
)
{
return tvec3<T, P>(
v1.x + T(v2.x),
v1.y + T(v2.y),
v1.z + T(v2.z));
v1.x + v2.x,
v1.y + v2.y,
v1.z + v2.z);
}
//operator-
@ -711,9 +711,9 @@ namespace detail
)
{
return tvec3<T, P>(
v.x - T(s),
v.y - T(s),
v.z - T(s));
v.x - s,
v.y - s,
v.z - s);
}
template <typename T, precision P>
@ -724,9 +724,9 @@ namespace detail
)
{
return tvec3<T, P>(
T(s) - v.x,
T(s) - v.y,
T(s) - v.z);
s - v.x,
s - v.y,
s - v.z);
}
template <typename T, precision P>
@ -737,9 +737,9 @@ namespace detail
)
{
return tvec3<T, P>(
v1.x - T(v2.x),
v1.y - T(v2.y),
v1.z - T(v2.z));
v1.x - v2.x,
v1.y - v2.y,
v1.z - v2.z);
}
//operator*
@ -751,9 +751,9 @@ namespace detail
)
{
return tvec3<T, P>(
v.x * T(s),
v.y * T(s),
v.z * T(s));
v.x * s,
v.y * s,
v.z * s);
}
template <typename T, precision P>
@ -764,9 +764,9 @@ namespace detail
)
{
return tvec3<T, P>(
T(s) * v.x,
T(s) * v.y,
T(s) * v.z);
s * v.x,
s * v.y,
s * v.z);
}
template <typename T, precision P>
@ -777,9 +777,9 @@ namespace detail
)
{
return tvec3<T, P>(
v1.x * T(v2.x),
v1.y * T(v2.y),
v1.z * T(v2.z));
v1.x * v2.x,
v1.y * v2.y,
v1.z * v2.z);
}
//operator/
@ -791,9 +791,9 @@ namespace detail
)
{
return tvec3<T, P>(
v.x / T(s),
v.y / T(s),
v.z / T(s));
v.x / s,
v.y / s,
v.z / s);
}
template <typename T, precision P>
@ -804,9 +804,9 @@ namespace detail
)
{
return tvec3<T, P>(
T(s) / v.x,
T(s) / v.y,
T(s) / v.z);
s / v.x,
s / v.y,
s / v.z);
}
template <typename T, precision P>
@ -817,9 +817,9 @@ namespace detail
)
{
return tvec3<T, P>(
v1.x / T(v2.x),
v1.y / T(v2.y),
v1.z / T(v2.z));
v1.x / v2.x,
v1.y / v2.y,
v1.z / v2.z);
}
// Unary constant operators
@ -846,9 +846,9 @@ namespace detail
)
{
return tvec3<T, P>(
v.x % T(s),
v.y % T(s),
v.z % T(s));
v.x % s,
v.y % s,
v.z % s);
}
template <typename T, precision P>
@ -859,9 +859,9 @@ namespace detail
)
{
return tvec3<T, P>(
T(s) % v.x,
T(s) % v.y,
T(s) % v.z);
s % v.x,
s % v.y,
s % v.z);
}
template <typename T, precision P>
@ -872,9 +872,9 @@ namespace detail
)
{
return tvec3<T, P>(
v1.x % T(v2.x),
v1.y % T(v2.y),
v1.z % T(v2.z));
v1.x % v2.x,
v1.y % v2.y,
v1.z % v2.z);
}
template <typename T, precision P>
@ -885,9 +885,9 @@ namespace detail
)
{
return tvec3<T, P>(
v.x & T(s),
v.y & T(s),
v.z & T(s));
v.x & s,
v.y & s,
v.z & s);
}
template <typename T, precision P>
@ -898,9 +898,9 @@ namespace detail
)
{
return tvec3<T, P>(
T(s) & v.x,
T(s) & v.y,
T(s) & v.z);
s & v.x,
s & v.y,
s & v.z);
}
template <typename T, precision P>
@ -911,9 +911,9 @@ namespace detail
)
{
return tvec3<T, P>(
v1.x & T(v2.x),
v1.y & T(v2.y),
v1.z & T(v2.z));
v1.x & v2.x,
v1.y & v2.y,
v1.z & v2.z);
}
template <typename T, precision P>
@ -924,9 +924,9 @@ namespace detail
)
{
return tvec3<T, P>(
v.x | T(s),
v.y | T(s),
v.z | T(s));
v.x | s,
v.y | s,
v.z | s);
}
template <typename T, precision P>
@ -937,9 +937,9 @@ namespace detail
)
{
return tvec3<T, P>(
T(s) | v.x,
T(s) | v.y,
T(s) | v.z);
s | v.x,
s | v.y,
s | v.z);
}
template <typename T, precision P>
@ -950,9 +950,9 @@ namespace detail
)
{
return tvec3<T, P>(
v1.x | T(v2.x),
v1.y | T(v2.y),
v1.z | T(v2.z));
v1.x | v2.x,
v1.y | v2.y,
v1.z | v2.z);
}
template <typename T, precision P>
@ -963,9 +963,9 @@ namespace detail
)
{
return tvec3<T, P>(
v.x ^ T(s),
v.y ^ T(s),
v.z ^ T(s));
v.x ^ s,
v.y ^ s,
v.z ^ s);
}
template <typename T, precision P>

View File

@ -84,7 +84,7 @@ namespace detail
// Accesses
GLM_FUNC_DECL value_type & operator[](size_type i);
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
GLM_FUNC_DECL T const & operator[](size_type i) const;
//////////////////////////////////////
// Implicit basic constructors
@ -100,12 +100,12 @@ namespace detail
GLM_FUNC_DECL explicit tvec4(
ctor);
GLM_FUNC_DECL explicit tvec4(
value_type const & s);
T const & s);
GLM_FUNC_DECL explicit tvec4(
value_type const & s0,
value_type const & s1,
value_type const & s2,
value_type const & s3);
T const & s0,
T const & s1,
T const & s2,
T const & s3);
//////////////////////////////////////
// Conversion scalar constructors
@ -310,37 +310,37 @@ namespace detail
GLM_DETAIL_IS_VECTOR(tvec4);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v, typename tvec4<T, P>::value_type const & s);
GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v, typename tvec4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator+(typename tvec4<T, P>::value_type const & s, tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> operator+(typename tvec4<T, P>::T const & s, tvec4<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v, typename tvec4<T, P>::value_type const & s);
GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v, typename tvec4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator-(typename tvec4<T, P>::value_type const & s, tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> operator-(typename tvec4<T, P>::T const & s, tvec4<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator- (tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, typename tvec4<T, P>::value_type const & s);
GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, typename tvec4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator*(typename tvec4<T, P>::value_type const & s, tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> operator*(typename tvec4<T, P>::T const & s, tvec4<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v, typename tvec4<T, P>::value_type const & s);
GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v, typename tvec4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator/(typename tvec4<T, P>::value_type const & s, tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> operator/(typename tvec4<T, P>::T const & s, tvec4<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
@ -355,55 +355,55 @@ namespace detail
GLM_FUNC_DECL bool operator!=(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> const & v, typename tvec4<T, P>::value_type const & s);
GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> const & v, typename tvec4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator%(typename tvec4<T, P>::value_type const & s, tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> operator%(typename tvec4<T, P>::T const & s, tvec4<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> const & v, typename tvec4<T, P>::value_type const & s);
GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> const & v, typename tvec4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator&(typename tvec4<T, P>::value_type const & s, tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> operator&(typename tvec4<T, P>::T const & s, tvec4<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> const & v, typename tvec4<T, P>::value_type const & s);
GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> const & v, typename tvec4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator|(typename tvec4<T, P>::value_type const & s, tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> operator|(typename tvec4<T, P>::T const & s, tvec4<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> const & v, typename tvec4<T, P>::value_type const & s);
GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> const & v, typename tvec4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator^(typename tvec4<T, P>::value_type const & s, tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> operator^(typename tvec4<T, P>::T const & s, tvec4<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> const & v, typename tvec4<T, P>::value_type const & s);
GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> const & v, typename tvec4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator<<(typename tvec4<T, P>::value_type const & s, tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> operator<<(typename tvec4<T, P>::T const & s, tvec4<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> const & v, typename tvec4<T, P>::value_type const & s);
GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> const & v, typename tvec4<T, P>::T const & s);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator>>(typename tvec4<T, P>::value_type const & s, tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> operator>>(typename tvec4<T, P>::T const & s, tvec4<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> const & v1, tvec4<T, P> const & v2);

View File

@ -63,10 +63,10 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4() :
x(value_type(0)),
y(value_type(0)),
z(value_type(0)),
w(value_type(0))
x(0),
y(0),
z(0),
w(0)
{}
template <typename T, precision P>
@ -105,7 +105,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4
(
value_type const & s
T const & s
) :
x(s),
y(s),
@ -116,10 +116,10 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4
(
value_type const & s1,
value_type const & s2,
value_type const & s3,
value_type const & s4
T const & s1,
T const & s2,
T const & s3,
T const & s4
) :
x(s1),
y(s2),
@ -149,10 +149,10 @@ namespace detail
B const & s1,
C const & s2
) :
x(value_type(v.x)),
y(value_type(v.y)),
z(value_type(s1)),
w(value_type(s2))
x(static_cast<T>(v.x)),
y(static_cast<T>(v.y)),
z(static_cast<T>(s1)),
w(static_cast<T>(s2))
{}
template <typename T, precision P>
@ -163,10 +163,10 @@ namespace detail
tref2<B, P> const & v,
C const & s2
) :
x(value_type(s1)),
y(value_type(v.x)),
z(value_type(v.y)),
w(value_type(s2))
x(static_cast<T>(s1)),
y(static_cast<T>(v.x)),
z(static_cast<T>(v.y)),
w(static_cast<T>(s2))
{}
template <typename T, precision P>
@ -177,10 +177,10 @@ namespace detail
B const & s2,
tref2<C, P> const & v
) :
x(value_type(s1)),
y(value_type(s2)),
z(value_type(v.x)),
w(value_type(v.y))
x(static_cast<T>(s1)),
y(static_cast<T>(s2)),
z(static_cast<T>(v.x)),
w(static_cast<T>(v.y))
{}
template <typename T, precision P>
@ -190,10 +190,10 @@ namespace detail
tref3<A, P> const & v,
B const & s
) :
x(value_type(v.x)),
y(value_type(v.y)),
z(value_type(v.z)),
w(value_type(s))
x(static_cast<T>(v.x)),
y(static_cast<T>(v.y)),
z(static_cast<T>(v.z)),
w(static_cast<T>(s))
{}
template <typename T, precision P>
@ -203,10 +203,10 @@ namespace detail
A const & s,
tref3<B, P> const & v
) :
x(value_type(s)),
y(value_type(v.x)),
z(value_type(v.y)),
w(value_type(v.z))
x(static_cast<T>(s)),
y(static_cast<T>(v.x)),
z(static_cast<T>(v.y)),
w(static_cast<T>(v.z))
{}
template <typename T, precision P>
@ -216,10 +216,10 @@ namespace detail
tref2<A, P> const & v1,
tref2<B, P> const & v2
) :
x(value_type(v1.x)),
y(value_type(v1.y)),
z(value_type(v2.x)),
w(value_type(v2.y))
x(static_cast<T>(v1.x)),
y(static_cast<T>(v1.y)),
z(static_cast<T>(v2.x)),
w(static_cast<T>(v2.y))
{}
template <typename T, precision P>
@ -229,10 +229,10 @@ namespace detail
tvec2<A, P> const & v1,
tref2<B, P> const & v2
) :
x(value_type(v1.x)),
y(value_type(v1.y)),
z(value_type(v2.x)),
w(value_type(v2.y))
x(static_cast<T>(v1.x)),
y(static_cast<T>(v1.y)),
z(static_cast<T>(v2.x)),
w(static_cast<T>(v2.y))
{}
template <typename T, precision P>
@ -242,10 +242,10 @@ namespace detail
tref2<A, P> const & v1,
tvec2<B, P> const & v2
) :
x(value_type(v1.x)),
y(value_type(v1.y)),
z(value_type(v2.x)),
w(value_type(v2.y))
x(static_cast<T>(v1.x)),
y(static_cast<T>(v1.y)),
z(static_cast<T>(v2.x)),
w(static_cast<T>(v2.y))
{}
//////////////////////////////////////
@ -257,10 +257,10 @@ namespace detail
(
U const & x
) :
x(value_type(x)),
y(value_type(x)),
z(value_type(x)),
w(value_type(x))
x(static_cast<T>(x)),
y(static_cast<T>(x)),
z(static_cast<T>(x)),
w(static_cast<T>(x))
{}
template <typename T, precision P>
@ -272,22 +272,22 @@ namespace detail
C const & z,
D const & w
) :
x(value_type(x)),
y(value_type(y)),
z(value_type(z)),
w(value_type(w))
x(static_cast<T>(x)),
y(static_cast<T>(y)),
z(static_cast<T>(z)),
w(static_cast<T>(w))
{}
template <typename T, precision P>
template <typename U, precision Q>
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4
(
tvec4<U, Q> const & v
tvec4<U, Q> const & v
) :
x(value_type(v.x)),
y(value_type(v.y)),
z(value_type(v.z)),
w(value_type(v.w))
x(static_cast<T>(v.x)),
y(static_cast<T>(v.y)),
z(static_cast<T>(v.z)),
w(static_cast<T>(v.w))
{}
//////////////////////////////////////
@ -301,10 +301,10 @@ namespace detail
B const & s1,
C const & s2
) :
x(value_type(v.x)),
y(value_type(v.y)),
z(value_type(s1)),
w(value_type(s2))
x(static_cast<T>(v.x)),
y(static_cast<T>(v.y)),
z(static_cast<T>(s1)),
w(static_cast<T>(s2))
{}
template <typename T, precision P>
@ -315,10 +315,10 @@ namespace detail
tvec2<B, Q> const & v,
C const & s2
) :
x(value_type(s1)),
y(value_type(v.x)),
z(value_type(v.y)),
w(value_type(s2))
x(static_cast<T>(s1)),
y(static_cast<T>(v.x)),
z(static_cast<T>(v.y)),
w(static_cast<T>(s2))
{}
template <typename T, precision P>
@ -329,10 +329,10 @@ namespace detail
B const & s2,
tvec2<C, Q> const & v
) :
x(value_type(s1)),
y(value_type(s2)),
z(value_type(v.x)),
w(value_type(v.y))
x(static_cast<T>(s1)),
y(static_cast<T>(s2)),
z(static_cast<T>(v.x)),
w(static_cast<T>(v.y))
{}
template <typename T, precision P>
@ -342,10 +342,10 @@ namespace detail
tvec3<A, Q> const & v,
B const & s
) :
x(value_type(v.x)),
y(value_type(v.y)),
z(value_type(v.z)),
w(value_type(s))
x(static_cast<T>(v.x)),
y(static_cast<T>(v.y)),
z(static_cast<T>(v.z)),
w(static_cast<T>(s))
{}
template <typename T, precision P>
@ -355,10 +355,10 @@ namespace detail
A const & s,
tvec3<B, Q> const & v
) :
x(value_type(s)),
y(value_type(v.x)),
z(value_type(v.y)),
w(value_type(v.z))
x(static_cast<T>(s)),
y(static_cast<T>(v.x)),
z(static_cast<T>(v.y)),
w(static_cast<T>(v.z))
{}
template <typename T, precision P>
@ -368,10 +368,10 @@ namespace detail
tvec2<A, Q> const & v1,
tvec2<B, Q> const & v2
) :
x(value_type(v1.x)),
y(value_type(v1.y)),
z(value_type(v2.x)),
w(value_type(v2.y))
x(static_cast<T>(v1.x)),
y(static_cast<T>(v1.y)),
z(static_cast<T>(v2.x)),
w(static_cast<T>(v2.y))
{}
//////////////////////////////////////
@ -397,10 +397,10 @@ namespace detail
tvec4<U, Q> const & v
)
{
this->x = T(v.x);
this->y = T(v.y);
this->z = T(v.z);
this->w = T(v.w);
this->x = static_cast<T>(v.x);
this->y = static_cast<T>(v.y);
this->z = static_cast<T>(v.z);
this->w = static_cast<T>(v.w);
return *this;
}
@ -411,10 +411,10 @@ namespace detail
U const & s
)
{
this->x += T(s);
this->y += T(s);
this->z += T(s);
this->w += T(s);
this->x += static_cast<T>(s);
this->y += static_cast<T>(s);
this->z += static_cast<T>(s);
this->w += static_cast<T>(s);
return *this;
}
@ -425,10 +425,10 @@ namespace detail
tvec4<U, P> const & v
)
{
this->x += T(v.x);
this->y += T(v.y);
this->z += T(v.z);
this->w += T(v.w);
this->x += static_cast<T>(v.x);
this->y += static_cast<T>(v.y);
this->z += static_cast<T>(v.z);
this->w += static_cast<T>(v.w);
return *this;
}
@ -439,10 +439,10 @@ namespace detail
U const & s
)
{
this->x -= T(s);
this->y -= T(s);
this->z -= T(s);
this->w -= T(s);
this->x -= static_cast<T>(s);
this->y -= static_cast<T>(s);
this->z -= static_cast<T>(s);
this->w -= static_cast<T>(s);
return *this;
}
@ -453,10 +453,10 @@ namespace detail
tvec4<U, P> const & v
)
{
this->x -= T(v.x);
this->y -= T(v.y);
this->z -= T(v.z);
this->w -= T(v.w);
this->x -= static_cast<T>(v.x);
this->y -= static_cast<T>(v.y);
this->z -= static_cast<T>(v.z);
this->w -= static_cast<T>(v.w);
return *this;
}
@ -467,10 +467,10 @@ namespace detail
U const & s
)
{
this->x *= T(s);
this->y *= T(s);
this->z *= T(s);
this->w *= T(s);
this->x *= static_cast<T>(s);
this->y *= static_cast<T>(s);
this->z *= static_cast<T>(s);
this->w *= static_cast<T>(s);
return *this;
}
@ -481,10 +481,10 @@ namespace detail
tvec4<U, P> const & v
)
{
this->x *= T(v.x);
this->y *= T(v.y);
this->z *= T(v.z);
this->w *= T(v.w);
this->x *= static_cast<T>(v.x);
this->y *= static_cast<T>(v.y);
this->z *= static_cast<T>(v.z);
this->w *= static_cast<T>(v.w);
return *this;
}
@ -495,10 +495,10 @@ namespace detail
U const & s
)
{
this->x /= T(s);
this->y /= T(s);
this->z /= T(s);
this->w /= T(s);
this->x /= static_cast<T>(s);
this->y /= static_cast<T>(s);
this->z /= static_cast<T>(s);
this->w /= static_cast<T>(s);
return *this;
}
@ -509,10 +509,10 @@ namespace detail
tvec4<U, P> const & v
)
{
this->x /= T(v.x);
this->y /= T(v.y);
this->z /= T(v.z);
this->w /= T(v.w);
this->x /= static_cast<T>(v.x);
this->y /= static_cast<T>(v.y);
this->z /= static_cast<T>(v.z);
this->w /= static_cast<T>(v.w);
return *this;
}
@ -565,10 +565,10 @@ namespace detail
U const & s
)
{
this->x %= T(s);
this->y %= T(s);
this->z %= T(s);
this->w %= T(s);
this->x %= static_cast<T>(s);
this->y %= static_cast<T>(s);
this->z %= static_cast<T>(s);
this->w %= static_cast<T>(s);
return *this;
}
@ -579,10 +579,10 @@ namespace detail
tvec4<U, P> const & v
)
{
this->x %= T(v.x);
this->y %= T(v.y);
this->z %= T(v.z);
this->w %= T(v.w);
this->x %= static_cast<T>(v.x);
this->y %= static_cast<T>(v.y);
this->z %= static_cast<T>(v.z);
this->w %= static_cast<T>(v.w);
return *this;
}
@ -593,10 +593,10 @@ namespace detail
U const & s
)
{
this->x &= T(s);
this->y &= T(s);
this->z &= T(s);
this->w &= T(s);
this->x &= static_cast<T>(s);
this->y &= static_cast<T>(s);
this->z &= static_cast<T>(s);
this->w &= static_cast<T>(s);
return *this;
}
@ -607,10 +607,10 @@ namespace detail
tvec4<U, P> const & v
)
{
this->x &= T(v.x);
this->y &= T(v.y);
this->z &= T(v.z);
this->w &= T(v.w);
this->x &= static_cast<T>(v.x);
this->y &= static_cast<T>(v.y);
this->z &= static_cast<T>(v.z);
this->w &= static_cast<T>(v.w);
return *this;
}
@ -621,10 +621,10 @@ namespace detail
U const & s
)
{
this->x |= T(s);
this->y |= T(s);
this->z |= T(s);
this->w |= T(s);
this->x |= static_cast<T>(s);
this->y |= static_cast<T>(s);
this->z |= static_cast<T>(s);
this->w |= static_cast<T>(s);
return *this;
}
@ -635,10 +635,10 @@ namespace detail
tvec4<U, P> const & v
)
{
this->x |= T(v.x);
this->y |= T(v.y);
this->z |= T(v.z);
this->w |= T(v.w);
this->x |= static_cast<T>(v.x);
this->y |= static_cast<T>(v.y);
this->z |= static_cast<T>(v.z);
this->w |= static_cast<T>(v.w);
return *this;
}
@ -649,10 +649,10 @@ namespace detail
U const & s
)
{
this->x ^= T(s);
this->y ^= T(s);
this->z ^= T(s);
this->w ^= T(s);
this->x ^= static_cast<T>(s);
this->y ^= static_cast<T>(s);
this->z ^= static_cast<T>(s);
this->w ^= static_cast<T>(s);
return *this;
}
@ -663,10 +663,10 @@ namespace detail
tvec4<U, P> const & v
)
{
this->x ^= T(v.x);
this->y ^= T(v.y);
this->z ^= T(v.z);
this->w ^= T(v.w);
this->x ^= static_cast<T>(v.x);
this->y ^= static_cast<T>(v.y);
this->z ^= static_cast<T>(v.z);
this->w ^= static_cast<T>(v.w);
return *this;
}
@ -677,10 +677,10 @@ namespace detail
U const & s
)
{
this->x <<= T(s);
this->y <<= T(s);
this->z <<= T(s);
this->w <<= T(s);
this->x <<= static_cast<T>(s);
this->y <<= static_cast<T>(s);
this->z <<= static_cast<T>(s);
this->w <<= static_cast<T>(s);
return *this;
}
@ -691,10 +691,10 @@ namespace detail
tvec4<U, P> const & v
)
{
this->x <<= T(v.x);
this->y <<= T(v.y);
this->z <<= T(v.z);
this->w <<= T(v.w);
this->x <<= static_cast<T>(v.x);
this->y <<= static_cast<T>(v.y);
this->z <<= static_cast<T>(v.z);
this->w <<= static_cast<T>(v.w);
return *this;
}
@ -705,10 +705,10 @@ namespace detail
U const & s
)
{
this->x >>= T(s);
this->y >>= T(s);
this->z >>= T(s);
this->w >>= T(s);
this->x >>= static_cast<T>(s);
this->y >>= static_cast<T>(s);
this->z >>= static_cast<T>(s);
this->w >>= static_cast<T>(s);
return *this;
}
@ -719,10 +719,10 @@ namespace detail
tvec4<U, P> const & v
)
{
this->x >>= T(v.x);
this->y >>= T(v.y);
this->z >>= T(v.z);
this->w >>= T(v.w);
this->x >>= static_cast<T>(v.x);
this->y >>= static_cast<T>(v.y);
this->z >>= static_cast<T>(v.z);
this->w >>= static_cast<T>(v.w);
return *this;
}
@ -830,7 +830,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<T, P> operator+
(
tvec4<T, P> const & v,
typename tvec4<T, P>::value_type const & s
typename tvec4<T, P>::T const & s
)
{
return tvec4<T, P>(
@ -843,7 +843,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator+
(
typename tvec4<T, P>::value_type const & s,
typename tvec4<T, P>::T const & s,
tvec4<T, P> const & v
)
{
@ -873,7 +873,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<T, P> operator-
(
tvec4<T, P> const & v,
typename tvec4<T, P>::value_type const & s
typename tvec4<T, P>::T const & s
)
{
return tvec4<T, P>(
@ -886,7 +886,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator-
(
typename tvec4<T, P>::value_type const & s,
typename tvec4<T, P>::T const & s,
tvec4<T, P> const & v
)
{
@ -916,7 +916,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<T, P> operator*
(
tvec4<T, P> const & v,
typename tvec4<T, P>::value_type const & s
typename tvec4<T, P>::T const & s
)
{
return tvec4<T, P>(
@ -929,7 +929,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator*
(
typename tvec4<T, P>::value_type const & s,
typename tvec4<T, P>::T const & s,
tvec4<T, P> const & v
)
{
@ -959,7 +959,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<T, P> operator/
(
tvec4<T, P> const & v,
typename tvec4<T, P>::value_type const & s
typename tvec4<T, P>::T const & s
)
{
return tvec4<T, P>(
@ -972,7 +972,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator/
(
typename tvec4<T, P>::value_type const & s,
typename tvec4<T, P>::T const & s,
tvec4<T, P> const & v
)
{
@ -1041,7 +1041,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<T, P> operator%
(
tvec4<T, P> const & v,
typename tvec4<T, P>::value_type const & s
typename tvec4<T, P>::T const & s
)
{
return tvec4<T, P>(
@ -1054,7 +1054,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator%
(
typename tvec4<T, P>::value_type const & s,
typename tvec4<T, P>::T const & s,
tvec4<T, P> const & v
)
{
@ -1083,7 +1083,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<T, P> operator&
(
tvec4<T, P> const & v,
typename tvec4<T, P>::value_type const & s
typename tvec4<T, P>::T const & s
)
{
return tvec4<T, P>(
@ -1096,7 +1096,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator&
(
typename tvec4<T, P>::value_type const & s,
typename tvec4<T, P>::T const & s,
tvec4<T, P> const & v
)
{
@ -1125,7 +1125,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<T, P> operator|
(
tvec4<T, P> const & v,
typename tvec4<T, P>::value_type const & s
typename tvec4<T, P>::T const & s
)
{
return tvec4<T, P>(
@ -1138,7 +1138,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator|
(
typename tvec4<T, P>::value_type const & s,
typename tvec4<T, P>::T const & s,
tvec4<T, P> const & v
)
{
@ -1167,7 +1167,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<T, P> operator^
(
tvec4<T, P> const & v,
typename tvec4<T, P>::value_type const & s
typename tvec4<T, P>::T const & s
)
{
return tvec4<T, P>(
@ -1180,7 +1180,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator^
(
typename tvec4<T, P>::value_type const & s,
typename tvec4<T, P>::T const & s,
tvec4<T, P> const & v
)
{
@ -1209,7 +1209,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<T, P> operator<<
(
tvec4<T, P> const & v,
typename tvec4<T, P>::value_type const & s
typename tvec4<T, P>::T const & s
)
{
return tvec4<T, P>(
@ -1222,7 +1222,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator<<
(
typename tvec4<T, P>::value_type const & s,
typename tvec4<T, P>::T const & s,
tvec4<T, P> const & v
)
{
@ -1251,7 +1251,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<T, P> operator>>
(
tvec4<T, P> const & v,
typename tvec4<T, P>::value_type const & s
typename tvec4<T, P>::T const & s
)
{
return tvec4<T, P>(
@ -1264,7 +1264,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator>>
(
typename tvec4<T, P>::value_type const & s,
typename tvec4<T, P>::T const & s,
tvec4<T, P> const & v
)
{

View File

@ -47,7 +47,7 @@ namespace glm
public:
typedef T value_type;
angle(value_type const & x) :
angle(T const & x) :
data(x)
{}

View File

@ -61,7 +61,7 @@ namespace glm
typename genType::boolType epsilonEqual(
genType const & x,
genType const & y,
typename genType::value_type const & epsilon);
typename genType::T const & epsilon);
/// Returns the component-wise comparison of |x - y| < epsilon.
/// True if this expression is satisfied.
@ -81,7 +81,7 @@ namespace glm
typename genType::boolType epsilonNotEqual(
genType const & x,
genType const & y,
typename genType::value_type const & epsilon);
typename genType::T const & epsilon);
/// Returns the component-wise comparison of |x - y| >= epsilon.
/// True if this expression is not satisfied.

View File

@ -180,8 +180,8 @@ namespace glm
)
{
detail::tmat4x4<T, defaultp> Result(1);
Result[0][0] = T(2) / (right - left);
Result[1][1] = T(2) / (top - bottom);
Result[0][0] = static_cast<T>(2) / (right - left);
Result[1][1] = static_cast<T>(2) / (top - bottom);
Result[2][2] = - T(2) / (zFar - zNear);
Result[3][0] = - (right + left) / (right - left);
Result[3][1] = - (top + bottom) / (top - bottom);
@ -199,8 +199,8 @@ namespace glm
)
{
detail::tmat4x4<T, defaultp> Result(1);
Result[0][0] = T(2) / (right - left);
Result[1][1] = T(2) / (top - bottom);
Result[0][0] = static_cast<T>(2) / (right - left);
Result[1][1] = static_cast<T>(2) / (top - bottom);
Result[2][2] = - T(1);
Result[3][0] = - (right + left) / (right - left);
Result[3][1] = - (top + bottom) / (top - bottom);
@ -337,8 +337,8 @@ namespace glm
detail::tmat4x4<T, defaultp> Result(T(0));
Result[0][0] = (T(2) * zNear) / (right - left);
Result[1][1] = (T(2) * zNear) / (top - bottom);
Result[2][2] = T(0.0001) - T(1);
Result[2][3] = T(-1);
Result[2][2] = static_cast<T>(0.0001) - T(1);
Result[2][3] = static_cast<T>(-1);
Result[3][2] = - (T(0.0001) - T(2)) * zNear;
return Result;
}

View File

@ -128,7 +128,7 @@ namespace glm
GLM_FUNC_QUALIFIER detail::tvec4<T, P> grad4(T const & j, detail::tvec4<T, P> const & ip)
{
detail::tvec3<T, P> pXYZ = floor(fract(detail::tvec3<T, P>(j) * detail::tvec3<T, P>(ip)) * T(7)) * ip[2] - T(1);
T pW = T(1.5) - dot(abs(pXYZ), detail::tvec3<T, P>(1));
T pW = static_cast<T>(1.5) - dot(abs(pXYZ), detail::tvec3<T, P>(1));
detail::tvec4<T, P> s = detail::tvec4<T, P>(lessThan(detail::tvec4<T, P>(pXYZ, pW), detail::tvec4<T, P>(0.0)));
pXYZ = pXYZ + (detail::tvec3<T, P>(s) * T(2) - T(1)) * s.w;
return detail::tvec4<T, P>(pXYZ, pW);
@ -148,7 +148,7 @@ namespace glm
detail::tvec4<T, P> i = glm::permute(glm::permute(ix) + iy);
detail::tvec4<T, P> gx = T(2) * glm::fract(i / T(41)) - T(1);
detail::tvec4<T, P> gx = static_cast<T>(2) * glm::fract(i / T(41)) - T(1);
detail::tvec4<T, P> gy = glm::abs(gx) - T(0.5);
detail::tvec4<T, P> tx = glm::floor(gx + T(0.5));
gx = gx - tx;
@ -470,7 +470,7 @@ namespace glm
detail::tvec4<T, P> i = permute(permute(ix) + iy);
detail::tvec4<T, P> gx = T(2) * fract(i / T(41)) - T(1);
detail::tvec4<T, P> gx = static_cast<T>(2) * fract(i / T(41)) - T(1);
detail::tvec4<T, P> gy = abs(gx) - T(0.5);
detail::tvec4<T, P> tx = floor(gx + T(0.5));
gx = gx - tx;
@ -741,14 +741,14 @@ namespace glm
// Gradients: 41 points uniformly over a line, mapped onto a diamond.
// The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)
detail::tvec3<T, P> x = T(2) * fract(p * C.w) - T(1);
detail::tvec3<T, P> x = static_cast<T>(2) * fract(p * C.w) - T(1);
detail::tvec3<T, P> h = abs(x) - T(0.5);
detail::tvec3<T, P> ox = floor(x + T(0.5));
detail::tvec3<T, P> a0 = x - ox;
// Normalise gradients implicitly by scaling m
// Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h );
m *= T(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h);
m *= static_cast<T>(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h);
// Compute final noise value at P
detail::tvec3<T, P> g;
@ -792,7 +792,7 @@ namespace glm
// Gradients: 7x7 points over a square, mapped onto an octahedron.
// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)
T n_ = T(0.142857142857); // 1.0/7.0
T n_ = static_cast<T>(0.142857142857); // 1.0/7.0
detail::tvec3<T, P> ns(n_ * detail::tvec3<T, P>(D.w, D.y, D.z) - detail::tvec3<T, P>(D.x, D.z, D.x));
detail::tvec4<T, P> j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7)
@ -844,7 +844,7 @@ namespace glm
-0.447213595499958); // -1 + 4 * G4
// (sqrt(5) - 1)/4 = F4, used once below
T const F4 = T(0.309016994374947451);
T const F4 = static_cast<T>(0.309016994374947451);
// First corner
detail::tvec4<T, P> i = floor(v + dot(v, vec4(F4)));
@ -858,15 +858,15 @@ namespace glm
detail::tvec3<T, P> isYZ = step(detail::tvec3<T, P>(x0.z, x0.w, x0.w), detail::tvec3<T, P>(x0.y, x0.y, x0.z));
// i0.x = dot(isX, vec3(1.0));
//i0.x = isX.x + isX.y + isX.z;
//i0.yzw = T(1) - isX;
//i0.yzw = static_cast<T>(1) - isX;
i0 = detail::tvec4<T, P>(isX.x + isX.y + isX.z, T(1) - isX);
// i0.y += dot(isYZ.xy, vec2(1.0));
i0.y += isYZ.x + isYZ.y;
//i0.zw += 1.0 - detail::tvec2<T, P>(isYZ.x, isYZ.y);
i0.z += T(1) - isYZ.x;
i0.w += T(1) - isYZ.y;
i0.z += static_cast<T>(1) - isYZ.x;
i0.w += static_cast<T>(1) - isYZ.y;
i0.z += isYZ.z;
i0.w += T(1) - isYZ.z;
i0.w += static_cast<T>(1) - isYZ.z;
// i0 now contains the unique values 0,1,2,3 in each channel
detail::tvec4<T, P> i3 = clamp(i0, 0.0, 1.0);

View File

@ -71,13 +71,13 @@ namespace detail
GLM_FUNC_DECL explicit tquat(
tquat<U, Q> const & q);
GLM_FUNC_DECL explicit tquat(
value_type const & s,
T const & s,
glm::detail::tvec3<T, P> const & v);
GLM_FUNC_DECL explicit tquat(
value_type const & w,
value_type const & x,
value_type const & y,
value_type const & z);
T const & w,
T const & x,
T const & y,
T const & z);
// Convertions
@ -91,11 +91,11 @@ namespace detail
// Accesses
GLM_FUNC_DECL value_type & operator[](size_type i);
GLM_FUNC_DECL value_type const & operator[](size_type i) const;
GLM_FUNC_DECL T const & operator[](size_type i) const;
// Operators
GLM_FUNC_DECL tquat<T, P> & operator*=(value_type const & s);
GLM_FUNC_DECL tquat<T, P> & operator/=(value_type const & s);
GLM_FUNC_DECL tquat<T, P> & operator*=(T const & s);
GLM_FUNC_DECL tquat<T, P> & operator/=(T const & s);
};
template <typename T, precision P>

View File

@ -381,7 +381,7 @@ namespace detail
(
detail::tquat<T, P> const & x,
detail::tquat<T, P> const & y,
typename detail::tquat<T, P>::value_type const & a
typename detail::tquat<T, P>::T const & a
)
{
if(a <= typename detail::tquat<T, P>::value_type(0)) return x;
@ -406,7 +406,7 @@ namespace detail
{
typename detail::tquat<T, P>::value_type fSin = sqrt(T(1) - fCos * fCos);
typename detail::tquat<T, P>::value_type fAngle = atan(fSin, fCos);
typename detail::tquat<T, P>::value_type fOneOverSin = T(1) / fSin;
typename detail::tquat<T, P>::value_type fOneOverSin = static_cast<T>(1) / fSin;
k0 = sin((typename detail::tquat<T, P>::value_type(1) - a) * fAngle) * fOneOverSin;
k1 = sin((typename detail::tquat<T, P>::value_type(0) + a) * fAngle) * fOneOverSin;
}
@ -427,8 +427,8 @@ namespace detail
)
{
bool flip = false;
if(a <= T(0)) return x;
if(a >= T(1)) return y;
if(a <= static_cast<T>(0)) return x;
if(a >= static_cast<T>(1)) return y;
T cos_t = dot(x, y);
if(cos_t < T(0))
@ -440,7 +440,7 @@ namespace detail
T alpha(0), beta(0);
if(T(1) - cos_t < 1e-7)
beta = T(1) - alpha;
beta = static_cast<T>(1) - alpha;
else
{
T theta = acos(cos_t);
@ -493,8 +493,8 @@ namespace detail
)
{
// Lerp is only defined in [0, 1]
assert(a >= T(0));
assert(a <= T(1));
assert(a >= static_cast<T>(0));
assert(a <= static_cast<T>(1));
return x * (T(1) - a) + (y * a);
}
@ -559,7 +559,7 @@ namespace detail
GLM_FUNC_QUALIFIER detail::tquat<T, P> rotate
(
detail::tquat<T, P> const & q,
typename detail::tquat<T, P>::value_type const & angle,
typename detail::tquat<T, P>::T const & angle,
detail::tvec3<T, P> const & v
)
{
@ -569,7 +569,7 @@ namespace detail
typename detail::tquat<T, P>::value_type len = glm::length(Tmp);
if(abs(len - T(1)) > T(0.001))
{
T oneOverLen = T(1) / len;
T oneOverLen = static_cast<T>(1) / len;
Tmp.x *= oneOverLen;
Tmp.y *= oneOverLen;
Tmp.z *= oneOverLen;
@ -694,7 +694,7 @@ namespace detail
}
typename detail::tquat<T, P>::value_type biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5);
typename detail::tquat<T, P>::value_type mult = T(0.25) / biggestVal;
typename detail::tquat<T, P>::value_type mult = static_cast<T>(0.25) / biggestVal;
detail::tquat<T, P> Result;
switch(biggestIndex)
@ -759,10 +759,10 @@ namespace detail
detail::tquat<T, P> const & x
)
{
T tmp1 = T(1) - x.w * x.w;
if(tmp1 <= T(0))
T tmp1 = static_cast<T>(1) - x.w * x.w;
if(tmp1 <= static_cast<T>(0))
return detail::tvec3<T, P>(0, 0, 1);
T tmp2 = T(1) / sqrt(tmp1);
T tmp2 = static_cast<T>(1) / sqrt(tmp1);
return detail::tvec3<T, P>(x.x * tmp2, x.y * tmp2, x.z * tmp2);
}

View File

@ -15,7 +15,7 @@ namespace glm
detail::tvec3<T, P> hsv = hsvColor;
detail::tvec3<T, P> rgbColor;
if(hsv.y == T(0))
if(hsv.y == static_cast<T>(0))
// achromatic (grey)
rgbColor = detail::tvec3<T, P>(hsv.z);
else
@ -76,20 +76,20 @@ namespace glm
hsv.z = Max;
if(Max != T(0))
if(Max != static_cast<T>(0))
{
hsv.y = Delta / hsv.z;
T h = T(0);
T h = static_cast<T>(0);
if(rgbColor.r == Max)
// between yellow & magenta
h = T(0) + T(60) * (rgbColor.g - rgbColor.b) / Delta;
h = static_cast<T>(0) + T(60) * (rgbColor.g - rgbColor.b) / Delta;
else if(rgbColor.g == Max)
// between cyan & yellow
h = T(120) + T(60) * (rgbColor.b - rgbColor.r) / Delta;
h = static_cast<T>(120) + T(60) * (rgbColor.b - rgbColor.r) / Delta;
else
// between magenta & cyan
h = T(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta;
h = static_cast<T>(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta;
if(h < T(0))
hsv.x = h + T(360);
@ -99,8 +99,8 @@ namespace glm
else
{
// If r = g = b = 0 then s = 0, h is undefined
hsv.y = T(0);
hsv.x = T(0);
hsv.y = static_cast<T>(0);
hsv.x = static_cast<T>(0);
}
return hsv;

View File

@ -83,8 +83,8 @@ namespace detail
part_type const & operator[](int i) const;
// Operators
tdualquat<T, P> & operator*=(value_type const & s);
tdualquat<T, P> & operator/=(value_type const & s);
tdualquat<T, P> & operator*=(T const & s);
tdualquat<T, P> & operator/=(T const & s);
};
template <typename T, precision P>
@ -124,17 +124,17 @@ namespace detail
template <typename T, precision P>
detail::tdualquat<T, P> operator* (
detail::tdualquat<T, P> const & q,
typename detail::tdualquat<T, P>::value_type const & s);
typename detail::tdualquat<T, P>::T const & s);
template <typename T, precision P>
detail::tdualquat<T, P> operator* (
typename detail::tdualquat<T, P>::value_type const & s,
typename detail::tdualquat<T, P>::T const & s,
detail::tdualquat<T, P> const & q);
template <typename T, precision P>
detail::tdualquat<T, P> operator/ (
detail::tdualquat<T, P> const & q,
typename detail::tdualquat<T, P>::value_type const & s);
typename detail::tdualquat<T, P>::T const & s);
} //namespace detail
/// @addtogroup gtc_dual_quaternion
@ -154,7 +154,7 @@ namespace detail
detail::tdualquat<T, P> lerp(
detail::tdualquat<T, P> const & x,
detail::tdualquat<T, P> const & y,
typename detail::tdualquat<T, P>::value_type const & a);
typename detail::tdualquat<T, P>::T const & a);
/// Returns the q inverse.
///

View File

@ -117,7 +117,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator *=
(
value_type const & s
T const & s
)
{
this->real *= s;
@ -128,7 +128,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator /=
(
value_type const & s
T const & s
)
{
this->real /= s;
@ -215,7 +215,7 @@ namespace detail
GLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator*
(
detail::tdualquat<T, P> const & q,
typename detail::tdualquat<T, P>::value_type const & s
typename detail::tdualquat<T, P>::T const & s
)
{
return detail::tdualquat<T, P>(q.real * s, q.dual * s);
@ -224,7 +224,7 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator*
(
typename detail::tdualquat<T, P>::value_type const & s,
typename detail::tdualquat<T, P>::T const & s,
detail::tdualquat<T, P> const & q
)
{
@ -235,7 +235,7 @@ namespace detail
GLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator/
(
detail::tdualquat<T, P> const & q,
typename detail::tdualquat<T, P>::value_type const & s
typename detail::tdualquat<T, P>::T const & s
)
{
return detail::tdualquat<T, P>(q.real / s, q.dual / s);
@ -279,13 +279,13 @@ namespace detail
(
detail::tdualquat<T, P> const & x,
detail::tdualquat<T, P> const & y,
typename detail::tdualquat<T, P>::value_type const & a
typename detail::tdualquat<T, P>::T const & a
)
{
// Dual Quaternion Linear blend aka DLB:
// Lerp is only defined in [0, 1]
assert(a >= T(0));
assert(a <= T(1));
assert(a >= static_cast<T>(0));
assert(a <= static_cast<T>(1));
T const k = dot(x.real,y.real) < detail::tdualquat<T, P>::value_type(0) ? -a : a;
T const one(1);
return detail::tdualquat<T, P>(x * (one - a) + y * k);
@ -328,7 +328,7 @@ namespace detail
detail::tquat<T, P> r = x.real / length2(x.real);
detail::tquat<T, P> const rr(r.w * x.real.w, r.x * x.real.x, r.y * x.real.y, r.z * x.real.z);
r *= T(2);
r *= static_cast<T>(2);
T const xy = r.x * x.real.y;
T const xz = r.x * x.real.z;
@ -381,8 +381,8 @@ namespace detail
if(trace > T(0))
{
T const r = sqrt(T(1) + trace);
T const invr = T(0.5) / r;
real.w = T(0.5) * r;
T const invr = static_cast<T>(0.5) / r;
real.w = static_cast<T>(0.5) * r;
real.x = (x[2].y - x[1].z) * invr;
real.y = (x[0].z - x[2].x) * invr;
real.z = (x[1].x - x[0].y) * invr;
@ -390,8 +390,8 @@ namespace detail
else if(x[0].x > x[1].y && x[0].x > x[2].z)
{
T const r = sqrt(T(1) + x[0].x - x[1].y - x[2].z);
T const invr = T(0.5) / r;
real.x = T(0.5)*r;
T const invr = static_cast<T>(0.5) / r;
real.x = static_cast<T>(0.5)*r;
real.y = (x[1].x + x[0].y) * invr;
real.z = (x[0].z + x[2].x) * invr;
real.w = (x[2].y - x[1].z) * invr;
@ -399,19 +399,19 @@ namespace detail
else if(x[1].y > x[2].z)
{
T const r = sqrt(T(1) + x[1].y - x[0].x - x[2].z);
T const invr = T(0.5) / r;
T const invr = static_cast<T>(0.5) / r;
real.x = (x[1].x + x[0].y) * invr;
real.y = T(0.5) * r;
real.y = static_cast<T>(0.5) * r;
real.z = (x[2].y + x[1].z) * invr;
real.w = (x[0].z - x[2].x) * invr;
}
else
{
T const r = sqrt(T(1) + x[2].z - x[0].x - x[1].y);
T const invr = T(0.5) / r;
T const invr = static_cast<T>(0.5) / r;
real.x = (x[0].z + x[2].x) * invr;
real.y = (x[2].y + x[1].z) * invr;
real.z = T(0.5) * r;
real.z = static_cast<T>(0.5) * r;
real.w = (x[1].x - x[0].y) * invr;
}

View File

@ -134,19 +134,19 @@ namespace glm
Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb;
Result[0][1] = tmp_sb * tmp_cp;
Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb;
Result[0][3] = T(0);
Result[0][3] = static_cast<T>(0);
Result[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb;
Result[1][1] = tmp_cb * tmp_cp;
Result[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb;
Result[1][3] = T(0);
Result[1][3] = static_cast<T>(0);
Result[2][0] = tmp_sh * tmp_cp;
Result[2][1] = -tmp_sp;
Result[2][2] = tmp_ch * tmp_cp;
Result[2][3] = T(0);
Result[3][0] = T(0);
Result[3][1] = T(0);
Result[3][2] = T(0);
Result[3][3] = T(1);
Result[2][3] = static_cast<T>(0);
Result[3][0] = static_cast<T>(0);
Result[3][1] = static_cast<T>(0);
Result[3][2] = static_cast<T>(0);
Result[3][3] = static_cast<T>(1);
return Result;
}
@ -169,19 +169,19 @@ namespace glm
Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb;
Result[0][1] = tmp_sb * tmp_cp;
Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb;
Result[0][3] = T(0);
Result[0][3] = static_cast<T>(0);
Result[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb;
Result[1][1] = tmp_cb * tmp_cp;
Result[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb;
Result[1][3] = T(0);
Result[1][3] = static_cast<T>(0);
Result[2][0] = tmp_sh * tmp_cp;
Result[2][1] = -tmp_sp;
Result[2][2] = tmp_ch * tmp_cp;
Result[2][3] = T(0);
Result[3][0] = T(0);
Result[3][1] = T(0);
Result[3][2] = T(0);
Result[3][3] = T(1);
Result[2][3] = static_cast<T>(0);
Result[3][0] = static_cast<T>(0);
Result[3][1] = static_cast<T>(0);
Result[3][2] = static_cast<T>(0);
Result[3][3] = static_cast<T>(1);
return Result;
}

View File

@ -69,8 +69,8 @@ namespace glm
>
C<T> min(
C<T> const & x,
typename C<T>::value_type const & y,
typename C<T>::value_type const & z);
typename C<T>::T const & y,
typename C<T>::T const & z);
/// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max
@ -102,9 +102,9 @@ namespace glm
>
C<T> min(
C<T> const & x,
typename C<T>::value_type const & y,
typename C<T>::value_type const & z,
typename C<T>::value_type const & w);
typename C<T>::T const & y,
typename C<T>::T const & z,
typename C<T>::T const & w);
/// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max
@ -136,8 +136,8 @@ namespace glm
>
C<T> max(
C<T> const & x,
typename C<T>::value_type const & y,
typename C<T>::value_type const & z);
typename C<T>::T const & y,
typename C<T>::T const & z);
/// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max
@ -169,9 +169,9 @@ namespace glm
>
C<T> max(
C<T> const & x,
typename C<T>::value_type const & y,
typename C<T>::value_type const & z,
typename C<T>::value_type const & w);
typename C<T>::T const & y,
typename C<T>::T const & z,
typename C<T>::T const & w);
/// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max

View File

@ -26,8 +26,8 @@ namespace glm
GLM_FUNC_QUALIFIER C<T> min
(
C<T> const & x,
typename C<T>::value_type const & y,
typename C<T>::value_type const & z
typename C<T>::T const & y,
typename C<T>::T const & z
)
{
return glm::min(glm::min(x, y), z);
@ -68,9 +68,9 @@ namespace glm
GLM_FUNC_QUALIFIER C<T> min
(
C<T> const & x,
typename C<T>::value_type const & y,
typename C<T>::value_type const & z,
typename C<T>::value_type const & w
typename C<T>::T const & y,
typename C<T>::T const & z,
typename C<T>::T const & w
)
{
return glm::min(glm::min(x, y), glm::min(z, w));
@ -109,8 +109,8 @@ namespace glm
GLM_FUNC_QUALIFIER C<T> max
(
C<T> const & x,
typename C<T>::value_type const & y,
typename C<T>::value_type const & z
typename C<T>::T const & y,
typename C<T>::T const & z
)
{
return glm::max(glm::max(x, y), z);
@ -151,9 +151,9 @@ namespace glm
GLM_FUNC_QUALIFIER C<T> max
(
C<T> const & x,
typename C<T>::value_type const & y,
typename C<T>::value_type const & z,
typename C<T>::value_type const & w
typename C<T>::T const & y,
typename C<T>::T const & z,
typename C<T>::T const & w
)
{
return glm::max(glm::max(x, y), glm::max(z, w));

View File

@ -21,7 +21,7 @@ namespace glm
template <typename T>
GLM_FUNC_QUALIFIER T fastPow(const T x, int y)
{
T f = T(1);
T f = static_cast<T>(1);
for(int i = 0; i < y; ++i)
f *= x;
return f;

View File

@ -46,7 +46,7 @@ namespace glm
{
T a = Mass * Radius * Radius / T(2);
detail::tmat3x3<T, P> Result(a);
Result[2][2] *= T(2);
Result[2][2] *= static_cast<T>(2);
return Result;
}
@ -59,8 +59,8 @@ namespace glm
{
T a = Mass * Radius * Radius / T(2);
detail::tmat4x4<T, P> Result(a);
Result[2][2] *= T(2);
Result[3][3] = T(1);
Result[2][2] *= static_cast<T>(2);
Result[3][3] = static_cast<T>(1);
return Result;
}
@ -71,7 +71,7 @@ namespace glm
T const & Radius
)
{
T a = T(2) * Mass * Radius * Radius / T(5);
T a = static_cast<T>(2) * Mass * Radius * Radius / T(5);
return detail::tmat3x3<T, P>(a);
}
@ -82,9 +82,9 @@ namespace glm
T const & Radius
)
{
T a = T(2) * Mass * Radius * Radius / T(5);
T a = static_cast<T>(2) * Mass * Radius * Radius / T(5);
detail::tmat4x4<T, P> Result(a);
Result[3][3] = T(1);
Result[3][3] = static_cast<T>(1);
return Result;
}
@ -95,7 +95,7 @@ namespace glm
T const & Radius
)
{
T a = T(2) * Mass * Radius * Radius / T(3);
T a = static_cast<T>(2) * Mass * Radius * Radius / T(3);
return detail::tmat3x3<T, P>(a);
}
@ -106,9 +106,9 @@ namespace glm
T const & Radius
)
{
T a = T(2) * Mass * Radius * Radius / T(3);
T a = static_cast<T>(2) * Mass * Radius * Radius / T(3);
detail::tmat4x4<T, P> Result(a);
Result[3][3] = T(1);
Result[3][3] = static_cast<T>(1);
return Result;
}
}//namespace glm

View File

@ -61,7 +61,7 @@ namespace _detail
GLM_FUNC_QUALIFIER T operator() (T const & Value) const
{
#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC))
return Value <= T(1) ? T(0) : T(32) - nlz(Value - T(1));
return Value <= static_cast<T>(1) ? T(0) : T(32) - nlz(Value - T(1));
#else
return T(32) - nlz(Value - T(1));
#endif

View File

@ -30,7 +30,7 @@ namespace glm
axis.z = (T)0.0;
return;
}
angle = T(3.1415926535897932384626433832795);
angle = static_cast<T>(3.1415926535897932384626433832795);
T xx = (mat[0][0] + (T)1.0) / (T)2.0;
T yy = (mat[1][1] + (T)1.0) / (T)2.0;
T zz = (mat[2][2] + (T)1.0) / (T)2.0;
@ -93,7 +93,7 @@ namespace glm
{
T c = cos(angle);
T s = sin(angle);
T t = T(1) - c;
T t = static_cast<T>(1) - c;
detail::tvec3<T, P> n = normalize(axis);
return detail::tmat4x4<T, P>(

View File

@ -79,7 +79,7 @@ namespace glm
template<typename genType>
bool isIdentity(
genType const & m,
typename genType::value_type const & epsilon/* = std::numeric_limits<typename genType::value_type>::epsilon()*/);
typename genType::T const & epsilon/* = std::numeric_limits<typename genType::value_type>::epsilon()*/);
/// Return whether a matrix is a normalized matrix.
/// From GLM_GTX_matrix_query extension.

View File

@ -54,7 +54,7 @@ namespace glm
GLM_FUNC_QUALIFIER bool isIdentity
(
genType const & m,
typename genType::value_type const & epsilon
typename genType::T const & epsilon
)
{
bool result = true;

View File

@ -73,7 +73,7 @@ namespace glm
detail::tquat<T, P> const & q
)
{
if((q.x == T(0)) && (q.y == T(0)) && (q.z == T(0)))
if((q.x == static_cast<T>(0)) && (q.y == static_cast<T>(0)) && (q.z == static_cast<T>(0)))
{
if(q.w > T(0))
return detail::tquat<T, P>(log(q.w), T(0), T(0), T(0));
@ -116,7 +116,7 @@ namespace glm
// detail::tquat<T, P> const & q
//)
//{
// T q0 = T(1) - dot(q, q);
// T q0 = static_cast<T>(1) - dot(q, q);
// return T(2) * (T(1) + q0) * q;
//}
@ -146,7 +146,7 @@ namespace glm
detail::tquat<T, P> const & q
)
{
T w = T(1.0) - q.x * q.x - q.y * q.y - q.z * q.z;
T w = static_cast<T>(1.0) - q.x * q.x - q.y * q.y - q.z * q.z;
if(w < T(0))
return T(0);
else
@ -185,14 +185,14 @@ namespace glm
T k0, k1;
if(fCos > T(0.9999))
{
k0 = T(1) - a;
k1 = T(0) + a; //BUG!!! 1.0f + a;
k0 = static_cast<T>(1) - a;
k1 = static_cast<T>(0) + a; //BUG!!! 1.0f + a;
}
else
{
T fSin = sqrt(T(1) - fCos * fCos);
T fAngle = atan(fSin, fCos);
T fOneOverSin = T(1) / fSin;
T fOneOverSin = static_cast<T>(1) / fSin;
k0 = sin((T(1) - a) * fAngle) * fOneOverSin;
k1 = sin((T(0) + a) * fAngle) * fOneOverSin;
}
@ -244,7 +244,7 @@ namespace glm
rotationAxis = cross(orig, dest);
T s = sqrt((T(1) + cosTheta) * T(2));
T invs = T(1) / s;
T invs = static_cast<T>(1) / s;
return detail::tquat<T, P>(
s * T(0.5f),

View File

@ -81,7 +81,7 @@ namespace glm
template <typename T, precision P>
detail::tquat<T, P> rotateNormalizedAxis(
detail::tquat<T, P> const & q,
typename detail::tquat<T, P>::value_type const & angle,
typename detail::tquat<T, P>::T const & angle,
detail::tvec3<T, P> const & axis);
/// @}

View File

@ -73,7 +73,7 @@ namespace glm
GLM_FUNC_QUALIFIER detail::tquat<T, P> rotateNormalizedAxis
(
detail::tquat<T, P> const & q,
typename detail::tquat<T, P>::value_type const & angle,
typename detail::tquat<T, P>::T const & angle,
detail::tvec3<T, P> const & v
)
{

View File

@ -235,7 +235,7 @@ GLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast_impl(const T m0[], const T m1
T trace = m0[0] + m1[1] + m2[2] + T(1.0);
if (trace > T(0))
{
T s = T(0.5) / sqrt(trace);
T s = static_cast<T>(0.5) / sqrt(trace);
return _mm_set_ps(
static_cast<float>(T(0.25) / s),

View File

@ -59,7 +59,7 @@ namespace glm
genType const & v2,
genType const & v3,
genType const & v4,
typename genType::value_type const & s);
typename genType::T const & s);
//! Return a point from a hermite curve.
/// @see gtx_spline extension.
@ -69,7 +69,7 @@ namespace glm
genType const & t1,
genType const & v2,
genType const & t2,
typename genType::value_type const & s);
typename genType::T const & s);
//! Return a point from a cubic curve.
/// @see gtx_spline extension.
@ -79,7 +79,7 @@ namespace glm
genType const & v2,
genType const & v3,
genType const & v4,
typename genType::value_type const & s);
typename genType::T const & s);
/// @}
}//namespace glm

View File

@ -16,7 +16,7 @@ GLM_FUNC_QUALIFIER genType catmullRom
genType const & v2,
genType const & v3,
genType const & v4,
typename genType::value_type const & s
typename genType::T const & s
)
{
typename genType::value_type s1 = s;
@ -39,7 +39,7 @@ GLM_FUNC_QUALIFIER genType hermite
genType const & t1,
genType const & v2,
genType const & t2,
typename genType::value_type const & s
typename genType::T const & s
)
{
typename genType::value_type s1 = s;
@ -61,7 +61,7 @@ GLM_FUNC_QUALIFIER genType cubic
genType const & v2,
genType const & v3,
genType const & v4,
typename genType::value_type const & s
typename genType::T const & s
)
{
return ((v1 * s + v2) * s + v3) * s + v4;

View File

@ -58,7 +58,7 @@ namespace glm
bool areCollinear(
genType const & v0,
genType const & v1,
typename genType::value_type const & epsilon);
typename genType::T const & epsilon);
//! Check whether two vectors are orthogonals.
/// @see gtx_vector_query extensions.
@ -66,7 +66,7 @@ namespace glm
bool areOrthogonal(
genType const & v0,
genType const & v1,
typename genType::value_type const & epsilon);
typename genType::T const & epsilon);
//! Check whether a vector is normalized.
/// @see gtx_vector_query extensions.
@ -102,7 +102,7 @@ namespace glm
bool areOrthonormal(
genType const & v0,
genType const & v1,
typename genType::value_type const & epsilon);
typename genType::T const & epsilon);
/// @}
}// namespace glm

View File

@ -19,7 +19,7 @@ namespace glm
(
detail::tvec2<T, P> const & v0,
detail::tvec2<T, P> const & v1,
typename detail::tvec2<T, P>::value_type const & epsilon
typename detail::tvec2<T, P>::T const & epsilon
)
{
return length(cross(detail::tvec3<T, P>(v0, T(0)), detail::tvec3<T, P>(v1, T(0)))) < epsilon;
@ -30,7 +30,7 @@ namespace glm
(
detail::tvec3<T, P> const & v0,
detail::tvec3<T, P> const & v1,
typename detail::tvec3<T, P>::value_type const & epsilon
typename detail::tvec3<T, P>::T const & epsilon
)
{
return length(cross(v0, v1)) < epsilon;
@ -41,7 +41,7 @@ namespace glm
(
detail::tvec4<T, P> const & v0,
detail::tvec4<T, P> const & v1,
typename detail::tvec4<T, P>::value_type const & epsilon
typename detail::tvec4<T, P>::T const & epsilon
)
{
return length(cross(detail::tvec3<T, P>(v0), detail::tvec3<T, P>(v1))) < epsilon;
@ -52,7 +52,7 @@ namespace glm
(
genType const & v0,
genType const & v1,
typename genType::value_type const & epsilon
typename genType::T const & epsilon
)
{
return abs(dot(v0, v1)) <= max(
@ -155,7 +155,7 @@ namespace glm
(
genType const & v0,
genType const & v1,
typename genType::value_type const & epsilon
typename genType::T const & epsilon
)
{
return isNormalized(v0, epsilon) && isNormalized(v1, epsilon) && (abs(dot(v0, v1)) <= epsilon);

View File

@ -53,6 +53,7 @@ GLM 0.9.5.0: 2013-XX-XX
- Fixed perspective with zNear == 0 (#71)
- Removed l-value swizzle operators
- Clean up compiler detection code for unsupported compilers
- Uses C++ casts
================================================================================
GLM 0.9.4.6: 2013-08-XX

View File

@ -63,7 +63,7 @@ int test_vec4_swizzle()
glm::vec4 A(1, 2, 3, 4);
glm::vec4 B = A.xyzw();
glm::vec4 C(0);
C.xyzw = B.xyzw;
//C.xyzw() = B.xyzw();
float f = glm::dot(C.wzyx(), C.xyzw());

View File

@ -47,25 +47,25 @@ int test_equal()
{
T A(0);
T B = T(0) + glm::epsilon<T>();
T B = static_cast<T>(0) + glm::epsilon<T>();
Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
}
{
T A(0);
T B = T(0) - glm::epsilon<T>();
T B = static_cast<T>(0) - glm::epsilon<T>();
Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
}
{
T A = T(0) + glm::epsilon<T>();
T B = T(0);
T A = static_cast<T>(0) + glm::epsilon<T>();
T B = static_cast<T>(0);
Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
}
{
T A = T(0) - glm::epsilon<T>();
T B = T(0);
T A = static_cast<T>(0) - glm::epsilon<T>();
T B = static_cast<T>(0);
Error += glm::epsilonEqual(A, B, glm::epsilon<T>() * T(2)) ? 0 : 1;
}