Merge remote-tracking branch 'upstream/master'

This commit is contained in:
jan p springer 2016-04-05 23:48:48 +01:00
commit e54f0cc5cd
43 changed files with 914 additions and 1158 deletions

View file

@ -17,12 +17,12 @@ enable_testing()
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
option(GLM_STATIC_LIBRARY_ENABLE "GLM static library" OFF)
if(NOT GLM_STATIC_LIBRARY_ENABLE)
if(GLM_STATIC_LIBRARY_ENABLE)
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_STATIC_LIBRARY_ENABLE with ON to build an optional static library")
endif()
option(GLM_DYNAMIC_LIBRARY_ENABLE "GLM static library" OFF)
if(NOT GLM_DYNAMIC_LIBRARY_ENABLE)
if(GLM_DYNAMIC_LIBRARY_ENABLE)
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_DYNAMIC_LIBRARY_ENABLE with ON to build an optional dynamic library")
endif()

View file

@ -87,7 +87,7 @@ namespace detail
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<bool, P> const & a)
{
vecType<T, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = a[i] ? y[i] : x[i];
return Result;
}

View file

@ -270,7 +270,7 @@ namespace detail
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'matrixCompMult' only accept floating-point inputs");
matType<T, P> result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(result); ++i)
for(length_t i = 0; i < result.length(); ++i)
result[i] = x[i] * y[i];
return result;
}
@ -281,7 +281,7 @@ namespace detail
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'outerProduct' only accept floating-point inputs");
typename detail::outerProduct_trait<T, P, vecTypeA, vecTypeB>::type m(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(m); ++i)
for(length_t i = 0; i < m.length(); ++i)
m[i] = c * r[i];
return m;
}

View file

@ -37,10 +37,10 @@ namespace glm
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<bool, P> lessThan(vecType<T, P> const & x, vecType<T, P> const & y)
{
assert(detail::component_count(x) == detail::component_count(y));
assert(x.length() == y.length());
vecType<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] < y[i];
return Result;
@ -49,10 +49,10 @@ namespace glm
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<bool, P> lessThanEqual(vecType<T, P> const & x, vecType<T, P> const & y)
{
assert(detail::component_count(x) == detail::component_count(y));
assert(x.length() == y.length());
vecType<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] <= y[i];
return Result;
}
@ -60,10 +60,10 @@ namespace glm
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<bool, P> greaterThan(vecType<T, P> const & x, vecType<T, P> const & y)
{
assert(detail::component_count(x) == detail::component_count(y));
assert(x.length() == y.length());
vecType<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] > y[i];
return Result;
}
@ -71,10 +71,10 @@ namespace glm
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<bool, P> greaterThanEqual(vecType<T, P> const & x, vecType<T, P> const & y)
{
assert(detail::component_count(x) == detail::component_count(y));
assert(x.length() == y.length());
vecType<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] >= y[i];
return Result;
}
@ -82,10 +82,10 @@ namespace glm
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<bool, P> equal(vecType<T, P> const & x, vecType<T, P> const & y)
{
assert(detail::component_count(x) == detail::component_count(y));
assert(x.length() == y.length());
vecType<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] == y[i];
return Result;
}
@ -93,10 +93,10 @@ namespace glm
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<bool, P> notEqual(vecType<T, P> const & x, vecType<T, P> const & y)
{
assert(detail::component_count(x) == detail::component_count(y));
assert(x.length() == y.length());
vecType<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] != y[i];
return Result;
}
@ -105,7 +105,7 @@ namespace glm
GLM_FUNC_QUALIFIER bool any(vecType<bool, P> const & v)
{
bool Result = false;
for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
for(length_t i = 0; i < v.length(); ++i)
Result = Result || v[i];
return Result;
}
@ -114,7 +114,7 @@ namespace glm
GLM_FUNC_QUALIFIER bool all(vecType<bool, P> const & v)
{
bool Result = true;
for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
for(length_t i = 0; i < v.length(); ++i)
Result = Result && v[i];
return Result;
}
@ -123,7 +123,7 @@ namespace glm
GLM_FUNC_QUALIFIER vecType<bool, P> not_(vecType<bool, P> const & v)
{
vecType<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
for(length_t i = 0; i < v.length(); ++i)
Result[i] = !v[i];
return Result;
}

View file

@ -62,6 +62,7 @@
#define GLM_PLATFORM_UNIX 0x00400000
#define GLM_PLATFORM_QNXNTO 0x00800000
#define GLM_PLATFORM_WINCE 0x01000000
#define GLM_PLATFORM_CYGWIN 0x02000000
#ifdef GLM_FORCE_PLATFORM_UNKNOWN
# define GLM_PLATFORM GLM_PLATFORM_UNKNOWN
@ -985,37 +986,16 @@
namespace glm
{
using std::size_t;
# if defined(GLM_FORCE_SIZE_T_LENGTH) || defined(GLM_FORCE_SIZE_FUNC)
# if defined(GLM_FORCE_SIZE_T_LENGTH)
typedef size_t length_t;
# else
typedef int length_t;
# endif
namespace detail
{
# ifdef GLM_FORCE_SIZE_FUNC
typedef size_t component_count_t;
# else
typedef length_t component_count_t;
# endif
template <typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR component_count_t component_count(genType const & m)
{
# ifdef GLM_FORCE_SIZE_FUNC
return m.size();
# else
return m.length();
# endif
}
}//namespace detail
}//namespace glm
#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH)
# define GLM_MESSAGE_FORCE_SIZE_T_LENGTH
# if defined GLM_FORCE_SIZE_FUNC
# pragma message("GLM: .length() is replaced by .size() and returns a std::size_t")
# elif defined GLM_FORCE_SIZE_T_LENGTH
# if defined GLM_FORCE_SIZE_T_LENGTH
# pragma message("GLM: .length() returns glm::length_t, a typedef of std::size_t")
# else
# pragma message("GLM: .length() returns glm::length_t, a typedef of int following the GLSL specification")

View file

@ -49,11 +49,6 @@ namespace glm
typedef tmat2x2<T, P> transpose_type;
typedef T value_type;
template <typename U, precision Q>
friend tvec2<U, Q> operator/(tmat2x2<U, Q> const & m, tvec2<U, Q> const & v);
template <typename U, precision Q>
friend tvec2<U, Q> operator/(tvec2<U, Q> const & v, tmat2x2<U, Q> const & m);
private:
col_type value[2];
@ -66,7 +61,7 @@ namespace glm
GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);
GLM_FUNC_DECL explicit tmat2x2(ctor);
GLM_FUNC_DECL explicit tmat2x2(T const & x);
GLM_FUNC_DECL explicit tmat2x2(T scalar);
GLM_FUNC_DECL tmat2x2(
T const & x1, T const & y1,
T const & x2, T const & y2);
@ -150,28 +145,28 @@ namespace glm
// -- Binary operators --
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator+(T const & s, tmat2x2<T, P> const & m);
GLM_FUNC_DECL tmat2x2<T, P> operator+(T scalar, tmat2x2<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator-(T const & s, tmat2x2<T, P> const & m);
GLM_FUNC_DECL tmat2x2<T, P> operator-(T scalar, tmat2x2<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
GLM_FUNC_DECL tmat2x2<T, P> operator-(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator*(T const & s, tmat2x2<T, P> const & m);
GLM_FUNC_DECL tmat2x2<T, P> operator*(T scalar, tmat2x2<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x2<T, P>::col_type operator*(tmat2x2<T, P> const & m, typename tmat2x2<T, P>::row_type const & v);
@ -180,7 +175,7 @@ namespace glm
GLM_FUNC_DECL typename tmat2x2<T, P>::row_type operator*(typename tmat2x2<T, P>::col_type const & v, tmat2x2<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat3x2<T, P> const & m2);
@ -189,10 +184,10 @@ namespace glm
GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat4x2<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator/(tmat2x2<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat2x2<T, P> operator/(tmat2x2<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator/(T const & s, tmat2x2<T, P> const & m);
GLM_FUNC_DECL tmat2x2<T, P> operator/(T scalar, tmat2x2<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x2<T, P>::col_type operator/(tmat2x2<T, P> const & m, typename tmat2x2<T, P>::row_type const & v);

View file

@ -85,10 +85,10 @@ namespace detail
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(T const & s)
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(T scalar)
{
this->value[0] = col_type(s, 0);
this->value[1] = col_type(0, s);
this->value[0] = col_type(scalar, 0);
this->value[1] = col_type(0, scalar);
}
template <typename T, precision P>
@ -199,47 +199,25 @@ namespace detail
// -- Accesses --
# ifdef GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x2<T, P>::size_type tmat2x2<T, P>::size() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x2<T, P>::length_type tmat2x2<T, P>::length() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::size_type i)
{
assert(i < this->size());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type const & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::size_type i) const
{
assert(i < this->size());
return this->value[i];
}
# else
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x2<T, P>::length_type tmat2x2<T, P>::length() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type const & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
# endif//GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type const & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
// -- Unary updatable operators --
@ -264,10 +242,10 @@ namespace detail
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator+=(U s)
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator+=(U scalar)
{
this->value[0] += s;
this->value[1] += s;
this->value[0] += scalar;
this->value[1] += scalar;
return *this;
}
@ -282,10 +260,10 @@ namespace detail
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator-=(U s)
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator-=(U scalar)
{
this->value[0] -= s;
this->value[1] -= s;
this->value[0] -= scalar;
this->value[1] -= scalar;
return *this;
}
@ -300,10 +278,10 @@ namespace detail
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator*=(U s)
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator*=(U scalar)
{
this->value[0] *= s;
this->value[1] *= s;
this->value[0] *= scalar;
this->value[1] *= scalar;
return *this;
}
@ -316,10 +294,10 @@ namespace detail
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator/=(U s)
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator/=(U scalar)
{
this->value[0] /= s;
this->value[1] /= s;
this->value[0] /= scalar;
this->value[1] /= scalar;
return *this;
}
@ -383,19 +361,19 @@ namespace detail
// -- Binary arithmetic operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+(tmat2x2<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+(tmat2x2<T, P> const & m, T scalar)
{
return tmat2x2<T, P>(
m[0] + s,
m[1] + s);
m[0] + scalar,
m[1] + scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+(T const & s, tmat2x2<T, P> const & m)
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+(T scalar, tmat2x2<T, P> const & m)
{
return tmat2x2<T, P>(
m[0] + s,
m[1] + s);
m[0] + scalar,
m[1] + scalar);
}
template <typename T, precision P>
@ -407,19 +385,19 @@ namespace detail
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-(tmat2x2<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-(tmat2x2<T, P> const & m, T scalar)
{
return tmat2x2<T, P>(
m[0] - s,
m[1] - s);
m[0] - scalar,
m[1] - scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-(T const & s, tmat2x2<T, P> const & m)
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator-(T scalar, tmat2x2<T, P> const & m)
{
return tmat2x2<T, P>(
s - m[0],
s - m[1]);
scalar - m[0],
scalar - m[1]);
}
template <typename T, precision P>
@ -431,19 +409,19 @@ namespace detail
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(tmat2x2<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(tmat2x2<T, P> const & m, T scalar)
{
return tmat2x2<T, P>(
m[0] * s,
m[1] * s);
m[0] * scalar,
m[1] * scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(T const & s, tmat2x2<T, P> const & m)
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator*(T scalar, tmat2x2<T, P> const & m)
{
return tmat2x2<T, P>(
m[0] * s,
m[1] * s);
m[0] * scalar,
m[1] * scalar);
}
template <typename T, precision P>
@ -507,19 +485,19 @@ namespace detail
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/(tmat2x2<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/(tmat2x2<T, P> const & m, T scalar)
{
return tmat2x2<T, P>(
m[0] / s,
m[1] / s);
m[0] / scalar,
m[1] / scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/(T const & s, tmat2x2<T, P> const & m)
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator/(T scalar, tmat2x2<T, P> const & m)
{
return tmat2x2<T, P>(
s / m[0],
s / m[1]);
scalar / m[0],
scalar / m[1]);
}
template <typename T, precision P>

View file

@ -62,10 +62,10 @@ namespace glm
GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);
GLM_FUNC_DECL explicit tmat2x3(ctor);
GLM_FUNC_DECL explicit tmat2x3(T const & s);
GLM_FUNC_DECL explicit tmat2x3(T scalar);
GLM_FUNC_DECL tmat2x3(
T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1);
T x0, T y0, T z0,
T x1, T y1, T z1);
GLM_FUNC_DECL tmat2x3(
col_type const & v0,
col_type const & v1);
@ -74,8 +74,8 @@ namespace glm
template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
GLM_FUNC_DECL tmat2x3(
X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2);
X1 x1, Y1 y1, Z1 z1,
X2 x2, Y2 y2, Z2 z2);
template <typename U, typename V>
GLM_FUNC_DECL tmat2x3(
@ -142,22 +142,22 @@ namespace glm
// -- Binary operators --
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat2x3<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat2x3<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator*(T const & s, tmat2x3<T, P> const & m);
GLM_FUNC_DECL tmat2x3<T, P> operator*(T scalar, tmat2x3<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x3<T, P>::col_type operator*(tmat2x3<T, P> const & m, typename tmat2x3<T, P>::row_type const & v);
@ -175,10 +175,10 @@ namespace glm
GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat4x2<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator/(tmat2x3<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat2x3<T, P> operator/(tmat2x3<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator/(T const & s, tmat2x3<T, P> const & m);
GLM_FUNC_DECL tmat2x3<T, P> operator/(T scalar, tmat2x3<T, P> const & m);
// -- Boolean operators --

View file

@ -67,17 +67,17 @@ namespace glm
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(T const & s)
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(T scalar)
{
this->value[0] = col_type(s, 0, 0);
this->value[1] = col_type(0, s, 0);
this->value[0] = col_type(scalar, 0, 0);
this->value[1] = col_type(0, scalar, 0);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3
(
T const & x0, T const & y0, T const & z0,
T const & x1, T const & y1, T const & z1
T x0, T y0, T z0,
T x1, T y1, T z1
)
{
this->value[0] = col_type(x0, y0, z0);
@ -99,8 +99,8 @@ namespace glm
typename X2, typename Y2, typename Z2>
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3
(
X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2
X1 x1, Y1 y1, Z1 z1,
X2 x2, Y2 y2, Z2 z2
)
{
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));
@ -183,47 +183,25 @@ namespace glm
// -- Accesses --
# ifdef GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x3<T, P>::size_type tmat2x3<T, P>::size() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x3<T, P>::length_type tmat2x3<T, P>::length() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::size_type i)
{
assert(i < this->size());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type const & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::size_type i) const
{
assert(i < this->size());
return this->value[i];
}
# else
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x3<T, P>::length_type tmat2x3<T, P>::length() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type const & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
# endif//GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type const & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
// -- Unary updatable operators --
@ -353,11 +331,11 @@ namespace glm
// -- Binary arithmetic operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T scalar)
{
return tmat2x3<T, P>(
m[0] + s,
m[1] + s);
m[0] + scalar,
m[1] + scalar);
}
template <typename T, precision P>
@ -369,11 +347,11 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator-(tmat2x3<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator-(tmat2x3<T, P> const & m, T scalar)
{
return tmat2x3<T, P>(
m[0] - s,
m[1] - s);
m[0] - scalar,
m[1] - scalar);
}
template <typename T, precision P>
@ -385,19 +363,19 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(tmat2x3<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(tmat2x3<T, P> const & m, T scalar)
{
return tmat2x3<T, P>(
m[0] * s,
m[1] * s);
m[0] * scalar,
m[1] * scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(T const & s, tmat2x3<T, P> const & m)
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator*(T scalar, tmat2x3<T, P> const & m)
{
return tmat2x3<T, P>(
m[0] * s,
m[1] * s);
m[0] * scalar,
m[1] * scalar);
}
template <typename T, precision P>
@ -484,19 +462,19 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator/(tmat2x3<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator/(tmat2x3<T, P> const & m, T scalar)
{
return tmat2x3<T, P>(
m[0] / s,
m[1] / s);
m[0] / scalar,
m[1] / scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator/(T const & s, tmat2x3<T, P> const & m)
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator/(T scalar, tmat2x3<T, P> const & m)
{
return tmat2x3<T, P>(
s / m[0],
s / m[1]);
scalar / m[0],
scalar / m[1]);
}
// -- Boolean operators --

View file

@ -62,10 +62,10 @@ namespace glm
GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);
GLM_FUNC_DECL explicit tmat2x4(ctor);
GLM_FUNC_DECL explicit tmat2x4(T const & s);
GLM_FUNC_DECL explicit tmat2x4(T scalar);
GLM_FUNC_DECL tmat2x4(
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 x0, T y0, T z0, T w0,
T x1, T y1, T z1, T w1);
GLM_FUNC_DECL tmat2x4(
col_type const & v0,
col_type const & v1);
@ -76,8 +76,8 @@ namespace glm
typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2>
GLM_FUNC_DECL tmat2x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);
X1 x1, Y1 y1, Z1 z1, W1 w1,
X2 x2, Y2 y2, Z2 z2, W2 w2);
template <typename U, typename V>
GLM_FUNC_DECL tmat2x4(
@ -144,22 +144,22 @@ namespace glm
// -- Binary operators --
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator*(T const & s, tmat2x4<T, P> const & m);
GLM_FUNC_DECL tmat2x4<T, P> operator*(T scalar, tmat2x4<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x4<T, P>::col_type operator*(tmat2x4<T, P> const & m, typename tmat2x4<T, P>::row_type const & v);
@ -177,10 +177,10 @@ namespace glm
GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat3x2<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator/(tmat2x4<T, P> const & m, const T& s);
GLM_FUNC_DECL tmat2x4<T, P> operator/(tmat2x4<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator/(T s, tmat2x4<T, P> const & m);
GLM_FUNC_DECL tmat2x4<T, P> operator/(T scalar, tmat2x4<T, P> const & m);
// -- Boolean operators --

View file

@ -67,18 +67,18 @@ namespace glm
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(T const & s)
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(T scalar)
{
value_type const Zero(0);
this->value[0] = col_type(s, Zero, Zero, Zero);
this->value[1] = col_type(Zero, s, Zero, Zero);
this->value[0] = col_type(scalar, Zero, Zero, Zero);
this->value[1] = col_type(Zero, scalar, Zero, Zero);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4
(
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 x0, T y0, T z0, T w0,
T x1, T y1, T z1, T w1
)
{
this->value[0] = col_type(x0, y0, z0, w0);
@ -100,8 +100,8 @@ namespace glm
typename X2, typename Y2, typename Z2, typename W2>
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4
(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2
X1 x1, Y1 y1, Z1 z1, W1 w1,
X2 x2, Y2 y2, Z2 z2, W2 w2
)
{
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));
@ -184,47 +184,25 @@ namespace glm
// -- Accesses --
# ifdef GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x4<T, P>::size_type tmat2x4<T, P>::size() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x4<T, P>::length_type tmat2x4<T, P>::length() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::size_type i)
{
assert(i < this->size());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type const & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::size_type i) const
{
assert(i < this->size());
return this->value[i];
}
# else
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x4<T, P>::length_type tmat2x4<T, P>::length() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type const & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
# endif//GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type const & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
// -- Unary updatable operators --
@ -354,11 +332,11 @@ namespace glm
// -- Binary arithmetic operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T scalar)
{
return tmat2x4<T, P>(
m[0] + s,
m[1] + s);
m[0] + scalar,
m[1] + scalar);
}
template <typename T, precision P>
@ -370,11 +348,11 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator-(tmat2x4<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator-(tmat2x4<T, P> const & m, T scalar)
{
return tmat2x4<T, P>(
m[0] - s,
m[1] - s);
m[0] - scalar,
m[1] - scalar);
}
template <typename T, precision P>
@ -386,19 +364,19 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(tmat2x4<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(tmat2x4<T, P> const & m, T scalar)
{
return tmat2x4<T, P>(
m[0] * s,
m[1] * s);
m[0] * scalar,
m[1] * scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(T const & s, tmat2x4<T, P> const & m)
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator*(T scalar, tmat2x4<T, P> const & m)
{
return tmat2x4<T, P>(
m[0] * s,
m[1] * s);
m[0] * scalar,
m[1] * scalar);
}
template <typename T, precision P>
@ -493,19 +471,19 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator/(tmat2x4<T, P> const & m, const T& s)
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator/(tmat2x4<T, P> const & m, T scalar)
{
return tmat2x4<T, P>(
m[0] / s,
m[1] / s);
m[0] / scalar,
m[1] / scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator/(T s, tmat2x4<T, P> const & m)
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator/(T scalar, tmat2x4<T, P> const & m)
{
return tmat2x4<T, P>(
s / m[0],
s / m[1]);
scalar / m[0],
scalar / m[1]);
}
// -- Boolean operators --

View file

@ -62,11 +62,11 @@ namespace glm
GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m);
GLM_FUNC_DECL explicit tmat3x2(ctor);
GLM_FUNC_DECL explicit tmat3x2(T const & s);
GLM_FUNC_DECL explicit tmat3x2(T scalar);
GLM_FUNC_DECL tmat3x2(
T const & x0, T const & y0,
T const & x1, T const & y1,
T const & x2, T const & y2);
T x0, T y0,
T x1, T y1,
T x2, T y2);
GLM_FUNC_DECL tmat3x2(
col_type const & v0,
col_type const & v1,
@ -79,9 +79,9 @@ namespace glm
typename X2, typename Y2,
typename X3, typename Y3>
GLM_FUNC_DECL tmat3x2(
X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2,
X3 const & x3, Y3 const & y3);
X1 x1, Y1 y1,
X2 x2, Y2 y2,
X3 x3, Y3 y3);
template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL tmat3x2(
@ -149,22 +149,22 @@ namespace glm
// -- Binary operators --
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator-(tmat3x2<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat3x2<T, P> operator-(tmat3x2<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator-(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat3x2<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat3x2<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator*(T const & s, tmat3x2<T, P> const & m);
GLM_FUNC_DECL tmat3x2<T, P> operator*(T scalar, tmat3x2<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x2<T, P>::col_type operator*(tmat3x2<T, P> const & m, typename tmat3x2<T, P>::row_type const & v);
@ -182,10 +182,10 @@ namespace glm
GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat4x3<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator/(tmat3x2<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat3x2<T, P> operator/(tmat3x2<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator/(T const & s, tmat3x2<T, P> const & m);
GLM_FUNC_DECL tmat3x2<T, P> operator/(T scalar, tmat3x2<T, P> const & m);
// -- Boolean operators --

View file

@ -70,19 +70,19 @@ namespace glm
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(T const & s)
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(T scalar)
{
this->value[0] = col_type(s, 0);
this->value[1] = col_type(0, s);
this->value[0] = col_type(scalar, 0);
this->value[1] = col_type(0, scalar);
this->value[2] = col_type(0, 0);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
(
T const & x0, T const & y0,
T const & x1, T const & y1,
T const & x2, T const & y2
T x0, T y0,
T x1, T y1,
T x2, T y2
)
{
this->value[0] = col_type(x0, y0);
@ -112,9 +112,9 @@ namespace glm
typename X3, typename Y3>
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
(
X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2,
X3 const & x3, Y3 const & y3
X1 x1, Y1 y1,
X2 x2, Y2 y2,
X3 x3, Y3 y3
)
{
this->value[0] = col_type(static_cast<T>(x1), value_type(y1));
@ -213,47 +213,25 @@ namespace glm
// -- Accesses --
# ifdef GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x2<T, P>::size_type tmat3x2<T, P>::size() const
{
return 3;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x2<T, P>::length_type tmat3x2<T, P>::length() const
{
return 3;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::size_type i)
{
assert(i < this->size());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type const & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::size_type i) const
{
assert(i < this->size());
return this->value[i];
}
# else
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x2<T, P>::length_type tmat3x2<T, P>::length() const
{
return 3;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type const & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
# endif//GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type const & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
// -- Unary updatable operators --
@ -394,12 +372,12 @@ namespace glm
// -- Binary arithmetic operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator+(tmat3x2<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator+(tmat3x2<T, P> const & m, T scalar)
{
return tmat3x2<T, P>(
m[0] + s,
m[1] + s,
m[2] + s);
m[0] + scalar,
m[1] + scalar,
m[2] + scalar);
}
template <typename T, precision P>
@ -412,12 +390,12 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator-(tmat3x2<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator-(tmat3x2<T, P> const & m, T scalar)
{
return tmat3x2<T, P>(
m[0] - s,
m[1] - s,
m[2] - s);
m[0] - scalar,
m[1] - scalar,
m[2] - scalar);
}
template <typename T, precision P>
@ -430,21 +408,21 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(tmat3x2<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(tmat3x2<T, P> const & m, T scalar)
{
return tmat3x2<T, P>(
m[0] * s,
m[1] * s,
m[2] * s);
m[0] * scalar,
m[1] * scalar,
m[2] * scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(T const & s, tmat3x2<T, P> const & m)
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator*(T scalar, tmat3x2<T, P> const & m)
{
return tmat3x2<T, P>(
m[0] * s,
m[1] * s,
m[2] * s);
m[0] * scalar,
m[1] * scalar,
m[2] * scalar);
}
template <typename T, precision P>
@ -516,21 +494,21 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator/(tmat3x2<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator/(tmat3x2<T, P> const & m, T scalar)
{
return tmat3x2<T, P>(
m[0] / s,
m[1] / s,
m[2] / s);
m[0] / scalar,
m[1] / scalar,
m[2] / scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator/(T const & s, tmat3x2<T, P> const & m)
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator/(T scalar, tmat3x2<T, P> const & m)
{
return tmat3x2<T, P>(
s / m[0],
s / m[1],
s / m[2]);
scalar / m[0],
scalar / m[1],
scalar / m[2]);
}
// -- Boolean operators --

View file

@ -49,11 +49,6 @@ namespace glm
typedef tmat3x3<T, P> transpose_type;
typedef T value_type;
template <typename U, precision Q>
friend tvec3<U, Q> operator/(tmat3x3<U, Q> const & m, tvec3<U, Q> const & v);
template <typename U, precision Q>
friend tvec3<U, Q> operator/(tvec3<U, Q> const & v, tmat3x3<U, Q> const & m);
private:
col_type value[3];
@ -66,11 +61,11 @@ namespace glm
GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);
GLM_FUNC_DECL explicit tmat3x3(ctor);
GLM_FUNC_DECL explicit tmat3x3(T const & s);
GLM_FUNC_DECL explicit tmat3x3(T scalar);
GLM_FUNC_DECL tmat3x3(
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 x0, T y0, T z0,
T x1, T y1, T z1,
T x2, T y2, T z2);
GLM_FUNC_DECL tmat3x3(
col_type const & v0,
col_type const & v1,
@ -83,9 +78,9 @@ namespace glm
typename X2, typename Y2, typename Z2,
typename X3, typename Y3, typename Z3>
GLM_FUNC_DECL tmat3x3(
X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2,
X3 const & x3, Y3 const & y3, Z3 const & z3);
X1 x1, Y1 y1, Z1 z1,
X2 x2, Y2 y2, Z2 z2,
X3 x3, Y3 y3, Z3 z3);
template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL tmat3x3(
@ -157,28 +152,28 @@ namespace glm
// -- Binary operators --
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator+(T const & s, tmat3x3<T, P> const & m);
GLM_FUNC_DECL tmat3x3<T, P> operator+(T scalar, tmat3x3<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator-(tmat3x3<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat3x3<T, P> operator-(tmat3x3<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator-(T const & s, tmat3x3<T, P> const & m);
GLM_FUNC_DECL tmat3x3<T, P> operator-(T scalar, tmat3x3<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator-(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat3x3<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat3x3<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator*(T const & s, tmat3x3<T, P> const & m);
GLM_FUNC_DECL tmat3x3<T, P> operator*(T scalar, tmat3x3<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator*(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v);
@ -196,10 +191,10 @@ namespace glm
GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat4x3<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator/(tmat3x3<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat3x3<T, P> operator/(tmat3x3<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator/(T const & s, tmat3x3<T, P> const & m);
GLM_FUNC_DECL tmat3x3<T, P> operator/(T scalar, tmat3x3<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator/(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v);

View file

@ -94,19 +94,19 @@ namespace detail
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(T const & s)
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(T scalar)
{
this->value[0] = col_type(s, 0, 0);
this->value[1] = col_type(0, s, 0);
this->value[2] = col_type(0, 0, s);
this->value[0] = col_type(scalar, 0, 0);
this->value[1] = col_type(0, scalar, 0);
this->value[2] = col_type(0, 0, scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
(
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 x0, T y0, T z0,
T x1, T y1, T z1,
T x2, T y2, T z2
)
{
this->value[0] = col_type(x0, y0, z0);
@ -136,9 +136,9 @@ namespace detail
typename X3, typename Y3, typename Z3>
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
(
X1 const & x1, Y1 const & y1, Z1 const & z1,
X2 const & x2, Y2 const & y2, Z2 const & z2,
X3 const & x3, Y3 const & y3, Z3 const & z3
X1 x1, Y1 y1, Z1 z1,
X2 x2, Y2 y2, Z2 z2,
X3 x3, Y3 y3, Z3 z3
)
{
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));
@ -237,47 +237,25 @@ namespace detail
// -- Accesses --
# ifdef GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x3<T, P>::size_type tmat3x3<T, P>::size() const
{
return 3;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x3<T, P>::length_type tmat3x3<T, P>::length() const
{
return 3;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::size_type i)
{
assert(i < this->size());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type const & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::size_type i) const
{
assert(i < this->size());
return this->value[i];
}
# else
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x3<T, P>::length_type tmat3x3<T, P>::length() const
{
return 3;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type const & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
# endif//GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type const & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
// -- Unary updatable operators --
@ -432,21 +410,21 @@ namespace detail
// -- Binary arithmetic operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+(tmat3x3<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+(tmat3x3<T, P> const & m, T scalar)
{
return tmat3x3<T, P>(
m[0] + s,
m[1] + s,
m[2] + s);
m[0] + scalar,
m[1] + scalar,
m[2] + scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+(T const & s, tmat3x3<T, P> const & m)
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+(T scalar, tmat3x3<T, P> const & m)
{
return tmat3x3<T, P>(
m[0] + s,
m[1] + s,
m[2] + s);
m[0] + scalar,
m[1] + scalar,
m[2] + scalar);
}
template <typename T, precision P>
@ -459,21 +437,21 @@ namespace detail
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-(tmat3x3<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-(tmat3x3<T, P> const & m, T scalar)
{
return tmat3x3<T, P>(
m[0] - s,
m[1] - s,
m[2] - s);
m[0] - scalar,
m[1] - scalar,
m[2] - scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-(T const & s, tmat3x3<T, P> const & m)
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator-(T scalar, tmat3x3<T, P> const & m)
{
return tmat3x3<T, P>(
s - m[0],
s - m[1],
s - m[2]);
scalar - m[0],
scalar - m[1],
scalar - m[2]);
}
template <typename T, precision P>
@ -486,21 +464,21 @@ namespace detail
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(tmat3x3<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(tmat3x3<T, P> const & m, T scalar)
{
return tmat3x3<T, P>(
m[0] * s,
m[1] * s,
m[2] * s);
m[0] * scalar,
m[1] * scalar,
m[2] * scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(T const & s, tmat3x3<T, P> const & m)
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator*(T scalar, tmat3x3<T, P> const & m)
{
return tmat3x3<T, P>(
m[0] * s,
m[1] * s,
m[2] * s);
m[0] * scalar,
m[1] * scalar,
m[2] * scalar);
}
template <typename T, precision P>
@ -588,21 +566,21 @@ namespace detail
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator/(tmat3x3<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator/(tmat3x3<T, P> const & m, T scalar)
{
return tmat3x3<T, P>(
m[0] / s,
m[1] / s,
m[2] / s);
m[0] / scalar,
m[1] / scalar,
m[2] / scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator/(T const & s, tmat3x3<T, P> const & m)
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator/(T scalar, tmat3x3<T, P> const & m)
{
return tmat3x3<T, P>(
s / m[0],
s / m[1],
s / m[2]);
scalar / m[0],
scalar / m[1],
scalar / m[2]);
}
template <typename T, precision P>

View file

@ -62,11 +62,11 @@ namespace glm
GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);
GLM_FUNC_DECL explicit tmat3x4(ctor);
GLM_FUNC_DECL explicit tmat3x4(T const & s);
GLM_FUNC_DECL explicit tmat3x4(T scalar);
GLM_FUNC_DECL tmat3x4(
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 x0, T y0, T z0, T w0,
T x1, T y1, T z1, T w1,
T x2, T y2, T z2, T w2);
GLM_FUNC_DECL tmat3x4(
col_type const & v0,
col_type const & v1,
@ -79,9 +79,9 @@ namespace glm
typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3>
GLM_FUNC_DECL tmat3x4(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);
X1 x1, Y1 y1, Z1 z1, W1 w1,
X2 x2, Y2 y2, Z2 z2, W2 w2,
X3 x3, Y3 y3, Z3 z3, W3 w3);
template <typename V1, typename V2, typename V3>
GLM_FUNC_DECL tmat3x4(
@ -149,22 +149,22 @@ namespace glm
// -- Binary operators --
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator+(tmat3x4<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat3x4<T, P> operator+(tmat3x4<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator+(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator-(tmat3x4<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat3x4<T, P> operator-(tmat3x4<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator-(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat3x4<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat3x4<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator*(T const & s, tmat3x4<T, P> const & m);
GLM_FUNC_DECL tmat3x4<T, P> operator*(T scalar, tmat3x4<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x4<T, P>::col_type operator*(tmat3x4<T, P> const & m, typename tmat3x4<T, P>::row_type const & v);
@ -182,10 +182,10 @@ namespace glm
GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat3x3<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator/(tmat3x4<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat3x4<T, P> operator/(tmat3x4<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator/(T const & s, tmat3x4<T, P> const & m);
GLM_FUNC_DECL tmat3x4<T, P> operator/(T scalar, tmat3x4<T, P> const & m);
// -- Boolean operators --

View file

@ -70,19 +70,19 @@ namespace glm
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(T const & s)
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(T scalar)
{
this->value[0] = col_type(s, 0, 0, 0);
this->value[1] = col_type(0, s, 0, 0);
this->value[2] = col_type(0, 0, s, 0);
this->value[0] = col_type(scalar, 0, 0, 0);
this->value[1] = col_type(0, scalar, 0, 0);
this->value[2] = col_type(0, 0, scalar, 0);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
(
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 x0, T y0, T z0, T w0,
T x1, T y1, T z1, T w1,
T x2, T y2, T z2, T w2
)
{
this->value[0] = col_type(x0, y0, z0, w0);
@ -112,9 +112,9 @@ namespace glm
typename X3, typename Y3, typename Z3, typename W3>
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
(
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3
X1 x1, Y1 y1, Z1 z1, W1 w1,
X2 x2, Y2 y2, Z2 z2, W2 w2,
X3 x3, Y3 y3, Z3 z3, W3 w3
)
{
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));
@ -213,47 +213,25 @@ namespace glm
// -- Accesses --
# ifdef GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x4<T, P>::size_type tmat3x4<T, P>::size() const
{
return 3;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x4<T, P>::length_type tmat3x4<T, P>::length() const
{
return 3;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::size_type i)
{
assert(i < this->size());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type const & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::size_type i) const
{
assert(i < this->size());
return this->value[i];
}
# else
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x4<T, P>::length_type tmat3x4<T, P>::length() const
{
return 3;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type const & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
# endif//GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type const & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
// -- Unary updatable operators --
@ -394,12 +372,12 @@ namespace glm
// -- Binary arithmetic operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator+(tmat3x4<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator+(tmat3x4<T, P> const & m, T scalar)
{
return tmat3x4<T, P>(
m[0] + s,
m[1] + s,
m[2] + s);
m[0] + scalar,
m[1] + scalar,
m[2] + scalar);
}
template <typename T, precision P>
@ -412,12 +390,12 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator-(tmat3x4<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator-(tmat3x4<T, P> const & m, T scalar)
{
return tmat3x4<T, P>(
m[0] - s,
m[1] - s,
m[2] - s);
m[0] - scalar,
m[1] - scalar,
m[2] - scalar);
}
template <typename T, precision P>
@ -430,21 +408,21 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(tmat3x4<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(tmat3x4<T, P> const & m, T scalar)
{
return tmat3x4<T, P>(
m[0] * s,
m[1] * s,
m[2] * s);
m[0] * scalar,
m[1] * scalar,
m[2] * scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(T const & s, tmat3x4<T, P> const & m)
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator*(T scalar, tmat3x4<T, P> const & m)
{
return tmat3x4<T, P>(
m[0] * s,
m[1] * s,
m[2] * s);
m[0] * scalar,
m[1] * scalar,
m[2] * scalar);
}
template <typename T, precision P>
@ -556,21 +534,21 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator/(tmat3x4<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator/(tmat3x4<T, P> const & m, T scalar)
{
return tmat3x4<T, P>(
m[0] / s,
m[1] / s,
m[2] / s);
m[0] / scalar,
m[1] / scalar,
m[2] / scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator/(T const & s, tmat3x4<T, P> const & m)
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator/(T scalar, tmat3x4<T, P> const & m)
{
return tmat3x4<T, P>(
s / m[0],
s / m[1],
s / m[2]);
scalar / m[0],
scalar / m[1],
scalar / m[2]);
}
// -- Boolean operators --

View file

@ -62,12 +62,12 @@ namespace glm
GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m);
GLM_FUNC_DECL explicit tmat4x2(ctor);
GLM_FUNC_DECL explicit tmat4x2(T const & x);
GLM_FUNC_DECL explicit tmat4x2(T scalar);
GLM_FUNC_DECL tmat4x2(
T const & x0, T const & y0,
T const & x1, T const & y1,
T const & x2, T const & y2,
T const & x3, T const & y3);
T x0, T y0,
T x1, T y1,
T x2, T y2,
T x3, T y3);
GLM_FUNC_DECL tmat4x2(
col_type const & v0,
col_type const & v1,
@ -82,10 +82,10 @@ namespace glm
typename X3, typename Y3,
typename X4, typename Y4>
GLM_FUNC_DECL tmat4x2(
X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2,
X3 const & x3, Y3 const & y3,
X4 const & x4, Y4 const & y4);
X1 x1, Y1 y1,
X2 x2, Y2 y2,
X3 x3, Y3 y3,
X4 x4, Y4 y4);
template <typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_DECL tmat4x2(
@ -154,22 +154,22 @@ namespace glm
// -- Binary operators --
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator+(tmat4x2<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat4x2<T, P> operator+(tmat4x2<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator+(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator-(tmat4x2<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat4x2<T, P> operator-(tmat4x2<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator-(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat4x2<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat4x2<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator*(T const & s, tmat4x2<T, P> const & m);
GLM_FUNC_DECL tmat4x2<T, P> operator*(T scalar, tmat4x2<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL typename tmat4x2<T, P>::col_type operator*(tmat4x2<T, P> const & m, typename tmat4x2<T, P>::row_type const & v);
@ -187,10 +187,10 @@ namespace glm
GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat4x4<T, P> const & m2);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator/(tmat4x2<T, P> const & m, T const & s);
GLM_FUNC_DECL tmat4x2<T, P> operator/(tmat4x2<T, P> const & m, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator/(T const & s, tmat4x2<T, P> const & m);
GLM_FUNC_DECL tmat4x2<T, P> operator/(T scalar, tmat4x2<T, P> const & m);
// -- Boolean operators --

View file

@ -80,10 +80,10 @@ namespace glm
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(T const & s)
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(T scalar)
{
this->value[0] = col_type(s, 0);
this->value[1] = col_type(0, s);
this->value[0] = col_type(scalar, 0);
this->value[1] = col_type(0, scalar);
this->value[2] = col_type(0, 0);
this->value[3] = col_type(0, 0);
}
@ -91,10 +91,10 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
(
T const & x0, T const & y0,
T const & x1, T const & y1,
T const & x2, T const & y2,
T const & x3, T const & y3
T x0, T y0,
T x1, T y1,
T x2, T y2,
T x3, T y3
)
{
this->value[0] = col_type(x0, y0);
@ -128,10 +128,10 @@ namespace glm
typename X4, typename Y4>
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
(
X1 const & x1, Y1 const & y1,
X2 const & x2, Y2 const & y2,
X3 const & x3, Y3 const & y3,
X4 const & x4, Y4 const & y4
X1 x1, Y1 y1,
X2 x2, Y2 y2,
X3 x3, Y3 y3,
X4 x4, Y4 y4
)
{
this->value[0] = col_type(static_cast<T>(x1), value_type(y1));
@ -242,47 +242,25 @@ namespace glm
// -- Accesses --
# ifdef GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x2<T, P>::size_type tmat4x2<T, P>::size() const
{
return 4;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x2<T, P>::length_type tmat4x2<T, P>::length() const
{
return 4;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::size_type i)
{
assert(i < this->size());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type const & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::size_type i) const
{
assert(i < this->size());
return this->value[i];
}
# else
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x2<T, P>::length_type tmat4x2<T, P>::length() const
{
return 4;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type const & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
# endif//GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type const & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
// -- Unary updatable operators --
@ -434,13 +412,13 @@ namespace glm
// -- Binary arithmetic operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator+(tmat4x2<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator+(tmat4x2<T, P> const & m, T scalar)
{
return tmat4x2<T, P>(
m[0] + s,
m[1] + s,
m[2] + s,
m[3] + s);
m[0] + scalar,
m[1] + scalar,
m[2] + scalar,
m[3] + scalar);
}
template <typename T, precision P>
@ -454,13 +432,13 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator-(tmat4x2<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator-(tmat4x2<T, P> const & m, T scalar)
{
return tmat4x2<T, P>(
m[0] - s,
m[1] - s,
m[2] - s,
m[3] - s);
m[0] - scalar,
m[1] - scalar,
m[2] - scalar,
m[3] - scalar);
}
template <typename T, precision P>
@ -474,23 +452,23 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(tmat4x2<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(tmat4x2<T, P> const & m, T scalar)
{
return tmat4x2<T, P>(
m[0] * s,
m[1] * s,
m[2] * s,
m[3] * s);
m[0] * scalar,
m[1] * scalar,
m[2] * scalar,
m[3] * scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(T const & s, tmat4x2<T, P> const & m)
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator*(T scalar, tmat4x2<T, P> const & m)
{
return tmat4x2<T, P>(
m[0] * s,
m[1] * s,
m[2] * s,
m[3] * s);
m[0] * scalar,
m[1] * scalar,
m[2] * scalar,
m[3] * scalar);
}
template <typename T, precision P>
@ -567,23 +545,23 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator/(tmat4x2<T, P> const & m, T const & s)
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator/(tmat4x2<T, P> const & m, T scalar)
{
return tmat4x2<T, P>(
m[0] / s,
m[1] / s,
m[2] / s,
m[3] / s);
m[0] / scalar,
m[1] / scalar,
m[2] / scalar,
m[3] / scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator/(T const & s, tmat4x2<T, P> const & m)
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator/(T scalar, tmat4x2<T, P> const & m)
{
return tmat4x2<T, P>(
s / m[0],
s / m[1],
s / m[2],
s / m[3]);
scalar / m[0],
scalar / m[1],
scalar / m[2],
scalar / m[3]);
}
// -- Boolean operators --

View file

@ -235,47 +235,25 @@ namespace glm
// -- Accesses --
# ifdef GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x3<T, P>::size_type tmat4x3<T, P>::size() const
{
return 4;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x3<T, P>::length_type tmat4x3<T, P>::length() const
{
return 4;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::size_type i)
{
assert(i < this->size());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type const & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::size_type i) const
{
assert(i < this->size());
return this->value[i];
}
# else
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x3<T, P>::length_type tmat4x3<T, P>::length() const
{
return 4;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type const & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
# endif//GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type const & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
// -- Unary updatable operators --

View file

@ -49,11 +49,6 @@ namespace glm
typedef tmat4x4<T, P> transpose_type;
typedef T value_type;
template <typename U, precision Q>
friend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v);
template <typename U, precision Q>
friend tvec4<U, Q> operator/(tvec4<U, Q> const & v, tmat4x4<U, Q> const & m);
private:
col_type value[4];
@ -210,7 +205,7 @@ namespace glm
GLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator/(tmat4x4<T, P> const & m, typename tmat4x4<T, P>::row_type const & v);
template <typename T, precision P>
GLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator/(typename tmat4x4<T, P>::col_type & v, tmat4x4<T, P> const & m);
GLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator/(typename tmat4x4<T, P>::col_type const & v, tmat4x4<T, P> const & m);
template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator/(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);

View file

@ -323,47 +323,25 @@ namespace detail
// -- Accesses --
# ifdef GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x4<T, P>::size_type tmat4x4<T, P>::size() const
{
return 4;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x4<T, P>::length_type tmat4x4<T, P>::length() const
{
return 4;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::size_type i)
{
assert(i < this->size());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type const & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::size_type i) const
{
assert(i < this->size());
return this->value[i];
}
# else
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x4<T, P>::length_type tmat4x4<T, P>::length() const
{
return 4;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::length_type i)
{
assert(i < this->length());
return this->value[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type const & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
# endif//GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type const & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::length_type i) const
{
assert(i < this->length());
return this->value[i];
}
// -- Unary arithmetic operators --

View file

@ -102,7 +102,7 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL explicit tvec1(ctor);
GLM_FUNC_DECL explicit tvec1(T const & scalar);
GLM_FUNC_DECL explicit tvec1(T scalar);
// -- Conversion vector constructors --
@ -137,19 +137,19 @@ namespace glm
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator=(tvec1<U, P> const & v);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator+=(U const & scalar);
GLM_FUNC_DECL tvec1<T, P> & operator+=(U scalar);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator+=(tvec1<U, P> const & v);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator-=(U const & scalar);
GLM_FUNC_DECL tvec1<T, P> & operator-=(U scalar);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator-=(tvec1<U, P> const & v);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator*=(U const & scalar);
GLM_FUNC_DECL tvec1<T, P> & operator*=(U scalar);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator*=(tvec1<U, P> const & v);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator/=(U const & scalar);
GLM_FUNC_DECL tvec1<T, P> & operator/=(U scalar);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator/=(tvec1<U, P> const & v);
@ -163,27 +163,27 @@ namespace glm
// -- Unary bit operators --
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator%=(U const & scalar);
GLM_FUNC_DECL tvec1<T, P> & operator%=(U scalar);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator%=(tvec1<U, P> const & v);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator&=(U const & scalar);
GLM_FUNC_DECL tvec1<T, P> & operator&=(U scalar);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator&=(tvec1<U, P> const & v);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator|=(U const & scalar);
GLM_FUNC_DECL tvec1<T, P> & operator|=(U scalar);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator|=(tvec1<U, P> const & v);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator^=(U const & scalar);
GLM_FUNC_DECL tvec1<T, P> & operator^=(U scalar);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator^=(tvec1<U, P> const & v);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator<<=(U const & scalar);
GLM_FUNC_DECL tvec1<T, P> & operator<<=(U scalar);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator<<=(tvec1<U, P> const & v);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator>>=(U const & scalar);
GLM_FUNC_DECL tvec1<T, P> & operator>>=(U scalar);
template <typename U>
GLM_FUNC_DECL tvec1<T, P> & operator>>=(tvec1<U, P> const & v);
};
@ -199,91 +199,91 @@ namespace glm
// -- Binary operators --
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator+(tvec1<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec1<T, P> operator+(tvec1<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator+(T const & scalar, tvec1<T, P> const & v);
GLM_FUNC_DECL tvec1<T, P> operator+(T scalar, tvec1<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator+(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator-(tvec1<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec1<T, P> operator-(tvec1<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator-(T const & scalar, tvec1<T, P> const & v);
GLM_FUNC_DECL tvec1<T, P> operator-(T scalar, tvec1<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator- (tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator*(tvec1<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec1<T, P> operator*(tvec1<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator*(T const & scalar, tvec1<T, P> const & v);
GLM_FUNC_DECL tvec1<T, P> operator*(T scalar, tvec1<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator*(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator/(tvec1<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec1<T, P> operator/(tvec1<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator/(T const & scalar, tvec1<T, P> const & v);
GLM_FUNC_DECL tvec1<T, P> operator/(T scalar, tvec1<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator/(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator%(tvec1<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec1<T, P> operator%(tvec1<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator%(T const & scalar, tvec1<T, P> const & v);
GLM_FUNC_DECL tvec1<T, P> operator%(T scalar, tvec1<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator%(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator&(tvec1<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec1<T, P> operator&(tvec1<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator&(T const & scalar, tvec1<T, P> const & v);
GLM_FUNC_DECL tvec1<T, P> operator&(T scalar, tvec1<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator&(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator|(tvec1<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec1<T, P> operator|(tvec1<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator|(T const & scalar, tvec1<T, P> const & v);
GLM_FUNC_DECL tvec1<T, P> operator|(T scalar, tvec1<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator|(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator^(tvec1<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec1<T, P> operator^(tvec1<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator^(T const & scalar, tvec1<T, P> const & v);
GLM_FUNC_DECL tvec1<T, P> operator^(T scalar, tvec1<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator^(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator<<(tvec1<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec1<T, P> operator<<(tvec1<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator<<(T const & scalar, tvec1<T, P> const & v);
GLM_FUNC_DECL tvec1<T, P> operator<<(T scalar, tvec1<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator<<(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator>>(tvec1<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec1<T, P> operator>>(tvec1<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator>>(T const & scalar, tvec1<T, P> const & v);
GLM_FUNC_DECL tvec1<T, P> operator>>(T scalar, tvec1<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec1<T, P> operator>>(tvec1<T, P> const & v1, tvec1<T, P> const & v2);

View file

@ -63,7 +63,7 @@ namespace glm
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(T const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(T scalar)
: x(scalar)
{}
@ -104,14 +104,14 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_QUALIFIER T & tvec1<T, P>::operator[](typename tvec1<T, P>::length_type i)
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
assert(i >= 0 && i < this->length());
return (&x)[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T const & tvec1<T, P>::operator[](typename tvec1<T, P>::length_type i) const
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
assert(i >= 0 && i < this->length());
return (&x)[i];
}
@ -136,7 +136,7 @@ namespace glm
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator+=(U const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator+=(U scalar)
{
this->x += static_cast<T>(scalar);
return *this;
@ -152,7 +152,7 @@ namespace glm
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator-=(U const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator-=(U scalar)
{
this->x -= static_cast<T>(scalar);
return *this;
@ -168,7 +168,7 @@ namespace glm
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator*=(U const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator*=(U scalar)
{
this->x *= static_cast<T>(scalar);
return *this;
@ -184,7 +184,7 @@ namespace glm
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator/=(U const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator/=(U scalar)
{
this->x /= static_cast<T>(scalar);
return *this;
@ -234,7 +234,7 @@ namespace glm
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator%=(U const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator%=(U scalar)
{
this->x %= static_cast<T>(scalar);
return *this;
@ -250,7 +250,7 @@ namespace glm
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator&=(U const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator&=(U scalar)
{
this->x &= static_cast<T>(scalar);
return *this;
@ -266,7 +266,7 @@ namespace glm
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator|=(U const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator|=(U scalar)
{
this->x |= static_cast<T>(scalar);
return *this;
@ -282,7 +282,7 @@ namespace glm
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator^=(U const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator^=(U scalar)
{
this->x ^= static_cast<T>(scalar);
return *this;
@ -298,7 +298,7 @@ namespace glm
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator<<=(U const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator<<=(U scalar)
{
this->x <<= static_cast<T>(scalar);
return *this;
@ -314,7 +314,7 @@ namespace glm
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator>>=(U const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator>>=(U scalar)
{
this->x >>= static_cast<T>(scalar);
return *this;
@ -346,14 +346,14 @@ namespace glm
// -- Binary arithmetic operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator+(tvec1<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> operator+(tvec1<T, P> const & v, T scalar)
{
return tvec1<T, P>(
v.x + scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator+(T const & scalar, tvec1<T, P> const & v)
GLM_FUNC_QUALIFIER tvec1<T, P> operator+(T scalar, tvec1<T, P> const & v)
{
return tvec1<T, P>(
scalar + v.x);
@ -368,14 +368,14 @@ namespace glm
//operator-
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator-(tvec1<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> operator-(tvec1<T, P> const & v, T scalar)
{
return tvec1<T, P>(
v.x - scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator-(T const & scalar, tvec1<T, P> const & v)
GLM_FUNC_QUALIFIER tvec1<T, P> operator-(T scalar, tvec1<T, P> const & v)
{
return tvec1<T, P>(
scalar - v.x);
@ -389,14 +389,14 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator*(tvec1<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> operator*(tvec1<T, P> const & v, T scalar)
{
return tvec1<T, P>(
v.x * scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator*(T const & scalar, tvec1<T, P> const & v)
GLM_FUNC_QUALIFIER tvec1<T, P> operator*(T scalar, tvec1<T, P> const & v)
{
return tvec1<T, P>(
scalar * v.x);
@ -410,14 +410,14 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator/(tvec1<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> operator/(tvec1<T, P> const & v, T scalar)
{
return tvec1<T, P>(
v.x / scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator/(T const & scalar, tvec1<T, P> const & v)
GLM_FUNC_QUALIFIER tvec1<T, P> operator/(T scalar, tvec1<T, P> const & v)
{
return tvec1<T, P>(
scalar / v.x);
@ -433,14 +433,14 @@ namespace glm
// -- Binary bit operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator%(tvec1<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> operator%(tvec1<T, P> const & v, T scalar)
{
return tvec1<T, P>(
v.x % scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator%(T const & scalar, tvec1<T, P> const & v)
GLM_FUNC_QUALIFIER tvec1<T, P> operator%(T scalar, tvec1<T, P> const & v)
{
return tvec1<T, P>(
scalar % v.x);
@ -454,14 +454,14 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator&(tvec1<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> operator&(tvec1<T, P> const & v, T scalar)
{
return tvec1<T, P>(
v.x & scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator&(T const & scalar, tvec1<T, P> const & v)
GLM_FUNC_QUALIFIER tvec1<T, P> operator&(T scalar, tvec1<T, P> const & v)
{
return tvec1<T, P>(
scalar & v.x);
@ -475,14 +475,14 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator|(tvec1<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> operator|(tvec1<T, P> const & v, T scalar)
{
return tvec1<T, P>(
v.x | scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator|(T const & scalar, tvec1<T, P> const & v)
GLM_FUNC_QUALIFIER tvec1<T, P> operator|(T scalar, tvec1<T, P> const & v)
{
return tvec1<T, P>(
scalar | v.x);
@ -496,14 +496,14 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator^(tvec1<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> operator^(tvec1<T, P> const & v, T scalar)
{
return tvec1<T, P>(
v.x ^ scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator^(T const & scalar, tvec1<T, P> const & v)
GLM_FUNC_QUALIFIER tvec1<T, P> operator^(T scalar, tvec1<T, P> const & v)
{
return tvec1<T, P>(
scalar ^ v.x);
@ -517,14 +517,14 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator<<(tvec1<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> operator<<(tvec1<T, P> const & v, T scalar)
{
return tvec1<T, P>(
v.x << scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator<<(T const & scalar, tvec1<T, P> const & v)
GLM_FUNC_QUALIFIER tvec1<T, P> operator<<(T scalar, tvec1<T, P> const & v)
{
return tvec1<T, P>(
scalar << v.x);
@ -538,14 +538,14 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator>>(tvec1<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec1<T, P> operator>>(tvec1<T, P> const & v, T scalar)
{
return tvec1<T, P>(
v.x >> scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec1<T, P> operator>>(T const & scalar, tvec1<T, P> const & v)
GLM_FUNC_QUALIFIER tvec1<T, P> operator>>(T scalar, tvec1<T, P> const & v)
{
return tvec1<T, P>(
scalar >> v.x);

View file

@ -102,14 +102,14 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL explicit tvec2(ctor);
GLM_FUNC_DECL explicit tvec2(T const & scalar);
GLM_FUNC_DECL tvec2(T const & s1, T const & s2);
GLM_FUNC_DECL explicit tvec2(T scalar);
GLM_FUNC_DECL tvec2(T s1, T s2);
// -- Conversion constructors --
/// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B>
GLM_FUNC_DECL tvec2(A const & x, B const & y);
GLM_FUNC_DECL tvec2(A x, B y);
template <typename A, typename B>
GLM_FUNC_DECL tvec2(tvec1<A, P> const & v1, tvec1<B, P> const & v2);
@ -225,13 +225,13 @@ namespace glm
// -- Binary operators --
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator+(T const & scalar, tvec2<T, P> const & v);
GLM_FUNC_DECL tvec2<T, P> operator+(T scalar, tvec2<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator+(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
@ -240,13 +240,13 @@ namespace glm
GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator-(T const & scalar, tvec2<T, P> const & v);
GLM_FUNC_DECL tvec2<T, P> operator-(T scalar, tvec2<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator-(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
@ -255,13 +255,13 @@ namespace glm
GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator*(T const & scalar, tvec2<T, P> const & v);
GLM_FUNC_DECL tvec2<T, P> operator*(T scalar, tvec2<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator*(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
@ -270,13 +270,13 @@ namespace glm
GLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator/(T const & scalar, tvec2<T, P> const & v);
GLM_FUNC_DECL tvec2<T, P> operator/(T scalar, tvec2<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator/(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
@ -285,13 +285,13 @@ namespace glm
GLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator%(T const & scalar, tvec2<T, P> const & v);
GLM_FUNC_DECL tvec2<T, P> operator%(T scalar, tvec2<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator%(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
@ -300,13 +300,13 @@ namespace glm
GLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator&(T const & scalar, tvec2<T, P> const & v);
GLM_FUNC_DECL tvec2<T, P> operator&(T scalar, tvec2<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator&(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
@ -315,13 +315,13 @@ namespace glm
GLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator|(T const & scalar, tvec2<T, P> const & v);
GLM_FUNC_DECL tvec2<T, P> operator|(T scalar, tvec2<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator|(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
@ -330,13 +330,13 @@ namespace glm
GLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator^(T const & scalar, tvec2<T, P> const & v);
GLM_FUNC_DECL tvec2<T, P> operator^(T scalar, tvec2<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator^(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
@ -345,13 +345,13 @@ namespace glm
GLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator<<(T const & scalar, tvec2<T, P> const & v);
GLM_FUNC_DECL tvec2<T, P> operator<<(T scalar, tvec2<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator<<(tvec1<T, P> const & v1, tvec2<T, P> const & v2);
@ -360,13 +360,13 @@ namespace glm
GLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator>>(T const & scalar, tvec2<T, P> const & v);
GLM_FUNC_DECL tvec2<T, P> operator>>(T scalar, tvec2<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec2<T, P> operator>>(tvec1<T, P> const & v1, tvec2<T, P> const & v2);

View file

@ -72,12 +72,12 @@ namespace glm
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(T const & scalar)
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(T scalar)
: x(scalar), y(scalar)
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(T const & s1, T const & s2)
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(T s1, T s2)
: x(s1), y(s2)
{}
@ -85,7 +85,7 @@ namespace glm
template <typename T, precision P>
template <typename A, typename B>
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(A const & a, B const & b)
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(A a, B b)
: x(static_cast<T>(a))
, y(static_cast<T>(b))
{}
@ -122,47 +122,25 @@ namespace glm
// -- Component accesses --
# ifdef GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec2<T, P>::size_type tvec2<T, P>::size() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec2<T, P>::length_type tvec2<T, P>::length() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T & tvec2<T, P>::operator[](typename tvec2<T, P>::size_type i)
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
return (&x)[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T & tvec2<T, P>::operator[](typename tvec2<T, P>::length_type i)
{
assert(i >= 0 && i < this->length());
return (&x)[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T const & tvec2<T, P>::operator[](typename tvec2<T, P>::size_type i) const
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
return (&x)[i];
}
# else
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec2<T, P>::length_type tvec2<T, P>::length() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T & tvec2<T, P>::operator[](typename tvec2<T, P>::length_type i)
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
return (&x)[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T const & tvec2<T, P>::operator[](typename tvec2<T, P>::length_type i) const
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
return (&x)[i];
}
# endif//GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER T const & tvec2<T, P>::operator[](typename tvec2<T, P>::length_type i) const
{
assert(i >= 0 && i < this->length());
return (&x)[i];
}
// -- Unary arithmetic operators --
@ -510,7 +488,7 @@ namespace glm
// -- Binary arithmetic operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator+(tvec2<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec2<T, P> operator+(tvec2<T, P> const & v, T scalar)
{
return tvec2<T, P>(
v.x + scalar,
@ -526,7 +504,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator+(T const & scalar, tvec2<T, P> const & v)
GLM_FUNC_QUALIFIER tvec2<T, P> operator+(T scalar, tvec2<T, P> const & v)
{
return tvec2<T, P>(
scalar + v.x,
@ -550,7 +528,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator-(tvec2<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec2<T, P> operator-(tvec2<T, P> const & v, T scalar)
{
return tvec2<T, P>(
v.x - scalar,
@ -566,7 +544,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator-(T const & scalar, tvec2<T, P> const & v)
GLM_FUNC_QUALIFIER tvec2<T, P> operator-(T scalar, tvec2<T, P> const & v)
{
return tvec2<T, P>(
scalar - v.x,
@ -590,11 +568,11 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator*(tvec2<T, P> const & v1, T const & v2)
GLM_FUNC_QUALIFIER tvec2<T, P> operator*(tvec2<T, P> const & v, T scalar)
{
return tvec2<T, P>(
v1.x * v2,
v1.y * v2);
v.x * scalar,
v.y * scalar);
}
template <typename T, precision P>
@ -606,7 +584,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator*(T const & scalar, tvec2<T, P> const & v)
GLM_FUNC_QUALIFIER tvec2<T, P> operator*(T scalar, tvec2<T, P> const & v)
{
return tvec2<T, P>(
scalar * v.x,
@ -630,7 +608,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator/(tvec2<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec2<T, P> operator/(tvec2<T, P> const & v, T scalar)
{
return tvec2<T, P>(
v.x / scalar,
@ -646,7 +624,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator/(T const & scalar, tvec2<T, P> const & v)
GLM_FUNC_QUALIFIER tvec2<T, P> operator/(T scalar, tvec2<T, P> const & v)
{
return tvec2<T, P>(
scalar / v.x,
@ -672,7 +650,7 @@ namespace glm
// -- Binary bit operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator%(tvec2<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec2<T, P> operator%(tvec2<T, P> const & v, T scalar)
{
return tvec2<T, P>(
v.x % scalar,
@ -688,7 +666,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator%(T const & scalar, tvec2<T, P> const & v)
GLM_FUNC_QUALIFIER tvec2<T, P> operator%(T scalar, tvec2<T, P> const & v)
{
return tvec2<T, P>(
scalar % v.x,
@ -712,7 +690,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator&(tvec2<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec2<T, P> operator&(tvec2<T, P> const & v, T scalar)
{
return tvec2<T, P>(
v.x & scalar,
@ -728,7 +706,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator&(T const & scalar, tvec2<T, P> const & v)
GLM_FUNC_QUALIFIER tvec2<T, P> operator&(T scalar, tvec2<T, P> const & v)
{
return tvec2<T, P>(
scalar & v.x,
@ -752,7 +730,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator|(tvec2<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec2<T, P> operator|(tvec2<T, P> const & v, T scalar)
{
return tvec2<T, P>(
v.x | scalar,
@ -768,7 +746,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator|(T const & scalar, tvec2<T, P> const & v)
GLM_FUNC_QUALIFIER tvec2<T, P> operator|(T scalar, tvec2<T, P> const & v)
{
return tvec2<T, P>(
scalar | v.x,
@ -792,7 +770,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator^(tvec2<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec2<T, P> operator^(tvec2<T, P> const & v, T scalar)
{
return tvec2<T, P>(
v.x ^ scalar,
@ -808,7 +786,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator^(T const & scalar, tvec2<T, P> const & v)
GLM_FUNC_QUALIFIER tvec2<T, P> operator^(T scalar, tvec2<T, P> const & v)
{
return tvec2<T, P>(
scalar ^ v.x,
@ -832,7 +810,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator<<(tvec2<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec2<T, P> operator<<(tvec2<T, P> const & v, T scalar)
{
return tvec2<T, P>(
v.x << scalar,
@ -848,7 +826,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator<<(T const & scalar, tvec2<T, P> const & v)
GLM_FUNC_QUALIFIER tvec2<T, P> operator<<(T scalar, tvec2<T, P> const & v)
{
return tvec2<T, P>(
scalar << v.x,
@ -872,7 +850,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator>>(tvec2<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec2<T, P> operator>>(tvec2<T, P> const & v, T scalar)
{
return tvec2<T, P>(
v.x >> scalar,
@ -888,7 +866,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec2<T, P> operator>>(T const & scalar, tvec2<T, P> const & v)
GLM_FUNC_QUALIFIER tvec2<T, P> operator>>(T scalar, tvec2<T, P> const & v)
{
return tvec2<T, P>(
scalar >> v.x,

View file

@ -103,14 +103,14 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL explicit tvec3(ctor);
GLM_FUNC_DECL explicit tvec3(T const & scalar);
GLM_FUNC_DECL tvec3(T const & a, T const & b, T const & c);
GLM_FUNC_DECL explicit tvec3(T scalar);
GLM_FUNC_DECL tvec3(T a, T b, T c);
// -- Conversion scalar constructors --
/// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C>
GLM_FUNC_DECL tvec3(A const & a, B const & b, C const & c);
GLM_FUNC_DECL tvec3(A a, B b, C c);
template <typename A, typename B, typename C>
GLM_FUNC_DECL tvec3(tvec1<A, P> const & a, tvec1<B, P> const & b, tvec1<C, P> const & c);
@ -118,13 +118,13 @@ namespace glm
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, precision Q>
GLM_FUNC_DECL tvec3(tvec2<A, Q> const & a, B const & b);
GLM_FUNC_DECL tvec3(tvec2<A, Q> const & a, B b);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, precision Q>
GLM_FUNC_DECL tvec3(tvec2<A, Q> const & a, tvec1<B, Q> const & b);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, precision Q>
GLM_FUNC_DECL tvec3(A const & a, tvec2<B, Q> const & b);
GLM_FUNC_DECL tvec3(A a, tvec2<B, Q> const & b);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, precision Q>
GLM_FUNC_DECL tvec3(tvec1<A, Q> const & a, tvec2<B, Q> const & b);
@ -247,151 +247,151 @@ namespace glm
// -- Binary operators --
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, tvec1<T, P> const & scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator+(T const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator+(T scalar, tvec3<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator+(tvec1<T, P> const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator+(tvec1<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v, tvec1<T, P> const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator-(T const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator-(T scalar, tvec3<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator-(tvec1<T, P> const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator-(tvec1<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, tvec1<T, P> const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator*(T const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator*(T scalar, tvec3<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator*(tvec1<T, P> const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator*(tvec1<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v, tvec1<T, P> const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator/(T const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator/(T scalar, tvec3<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator/(tvec1<T, P> const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator/(tvec1<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v, tvec1<T, P> const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator%(T const & scalar, tvec3<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator%(tvec1<T, P> const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator%(tvec1<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v1, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v, tvec1<T, P> const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator&(T const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator&(T scalar, tvec3<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator&(tvec1<T, P> const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator&(tvec1<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v, tvec1<T, P> const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator|(T const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator|(T scalar, tvec3<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator|(tvec1<T, P> const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator|(tvec1<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v, tvec1<T, P> const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator^(T const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator^(T scalar, tvec3<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator^(tvec1<T, P> const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator^(tvec1<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v, tvec1<T, P> const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator<<(T const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator<<(T scalar, tvec3<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator<<(tvec1<T, P> const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator<<(tvec1<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v, T const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v, tvec1<T, P> const & scalar);
GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator>>(T const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator>>(T scalar, tvec3<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator>>(tvec1<T, P> const & scalar, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator>>(tvec1<T, P> const & v1, tvec3<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v1, tvec3<T, P> const & v2);

View file

@ -89,12 +89,12 @@ namespace glm
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(T const & scalar)
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(T scalar)
: x(scalar), y(scalar), z(scalar)
{}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(T const & a, T const & b, T const & c)
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(T a, T b, T c)
: x(a), y(b), z(c)
{}
@ -102,7 +102,7 @@ namespace glm
template <typename T, precision P>
template <typename A, typename B, typename C>
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(A const & a, B const & b, C const & c) :
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(A a, B b, C c) :
x(static_cast<T>(a)),
y(static_cast<T>(b)),
z(static_cast<T>(c))
@ -120,7 +120,7 @@ namespace glm
template <typename T, precision P>
template <typename A, typename B, precision Q>
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec2<A, Q> const & a, B const & b) :
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec2<A, Q> const & a, B b) :
x(static_cast<T>(a.x)),
y(static_cast<T>(a.y)),
z(static_cast<T>(b))
@ -136,7 +136,7 @@ namespace glm
template <typename T, precision P>
template <typename A, typename B, precision Q>
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(A const & a, tvec2<B, Q> const & b) :
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(A a, tvec2<B, Q> const & b) :
x(static_cast<T>(a)),
y(static_cast<T>(b.x)),
z(static_cast<T>(b.y))
@ -168,47 +168,25 @@ namespace glm
// -- Component accesses --
# ifdef GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec3<T, P>::size_type tvec3<T, P>::size() const
{
return 3;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec3<T, P>::length_type tvec3<T, P>::length() const
{
return 3;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T & tvec3<T, P>::operator[](typename tvec3<T, P>::size_type i)
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
return (&x)[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T & tvec3<T, P>::operator[](typename tvec3<T, P>::length_type i)
{
assert(i >= 0 && i < this->length());
return (&x)[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T const & tvec3<T, P>::operator[](typename tvec3<T, P>::size_type i) const
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
return (&x)[i];
}
# else
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec3<T, P>::length_type tvec3<T, P>::length() const
{
return 3;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T & tvec3<T, P>::operator[](typename tvec3<T, P>::length_type i)
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
return (&x)[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T const & tvec3<T, P>::operator[](typename tvec3<T, P>::length_type i) const
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
return (&x)[i];
}
# endif//GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER T const & tvec3<T, P>::operator[](typename tvec3<T, P>::length_type i) const
{
assert(i >= 0 && i < this->length());
return (&x)[i];
}
// -- Unary arithmetic operators --
@ -591,7 +569,7 @@ namespace glm
// -- Binary arithmetic operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator+(tvec3<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec3<T, P> operator+(tvec3<T, P> const & v, T scalar)
{
return tvec3<T, P>(
v.x + scalar,
@ -609,7 +587,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator+(T const & scalar, tvec3<T, P> const & v)
GLM_FUNC_QUALIFIER tvec3<T, P> operator+(T scalar, tvec3<T, P> const & v)
{
return tvec3<T, P>(
scalar + v.x,
@ -636,7 +614,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator-(tvec3<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec3<T, P> operator-(tvec3<T, P> const & v, T scalar)
{
return tvec3<T, P>(
v.x - scalar,
@ -654,7 +632,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator-(T const & scalar, tvec3<T, P> const & v)
GLM_FUNC_QUALIFIER tvec3<T, P> operator-(T scalar, tvec3<T, P> const & v)
{
return tvec3<T, P>(
scalar - v.x,
@ -681,7 +659,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tvec3<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tvec3<T, P> const & v, T scalar)
{
return tvec3<T, P>(
v.x * scalar,
@ -699,7 +677,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator*(T const & scalar, tvec3<T, P> const & v)
GLM_FUNC_QUALIFIER tvec3<T, P> operator*(T scalar, tvec3<T, P> const & v)
{
return tvec3<T, P>(
scalar * v.x,
@ -726,7 +704,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator/(tvec3<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec3<T, P> operator/(tvec3<T, P> const & v, T scalar)
{
return tvec3<T, P>(
v.x / scalar,
@ -744,7 +722,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator/(T const & scalar, tvec3<T, P> const & v)
GLM_FUNC_QUALIFIER tvec3<T, P> operator/(T scalar, tvec3<T, P> const & v)
{
return tvec3<T, P>(
scalar / v.x,
@ -773,7 +751,7 @@ namespace glm
// -- Binary bit operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator%(tvec3<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec3<T, P> operator%(tvec3<T, P> const & v, T scalar)
{
return tvec3<T, P>(
v.x % scalar,
@ -791,7 +769,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator%(T const & scalar, tvec3<T, P> const & v)
GLM_FUNC_QUALIFIER tvec3<T, P> operator%(T scalar, tvec3<T, P> const & v)
{
return tvec3<T, P>(
scalar % v.x,
@ -818,7 +796,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator&(tvec3<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec3<T, P> operator&(tvec3<T, P> const & v, T scalar)
{
return tvec3<T, P>(
v.x & scalar,
@ -836,7 +814,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator&(T const & scalar, tvec3<T, P> const & v)
GLM_FUNC_QUALIFIER tvec3<T, P> operator&(T scalar, tvec3<T, P> const & v)
{
return tvec3<T, P>(
scalar & v.x,
@ -863,7 +841,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator|(tvec3<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec3<T, P> operator|(tvec3<T, P> const & v, T scalar)
{
return tvec3<T, P>(
v.x | scalar,
@ -881,7 +859,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator|(T const & scalar, tvec3<T, P> const & v)
GLM_FUNC_QUALIFIER tvec3<T, P> operator|(T scalar, tvec3<T, P> const & v)
{
return tvec3<T, P>(
scalar | v.x,
@ -908,7 +886,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator^(tvec3<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec3<T, P> operator^(tvec3<T, P> const & v, T scalar)
{
return tvec3<T, P>(
v.x ^ scalar,
@ -926,7 +904,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator^(T const & scalar, tvec3<T, P> const & v)
GLM_FUNC_QUALIFIER tvec3<T, P> operator^(T scalar, tvec3<T, P> const & v)
{
return tvec3<T, P>(
scalar ^ v.x,
@ -953,7 +931,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator<<(tvec3<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec3<T, P> operator<<(tvec3<T, P> const & v, T scalar)
{
return tvec3<T, P>(
v.x << scalar,
@ -971,7 +949,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator<<(T const & scalar, tvec3<T, P> const & v)
GLM_FUNC_QUALIFIER tvec3<T, P> operator<<(T scalar, tvec3<T, P> const & v)
{
return tvec3<T, P>(
scalar << v.x,
@ -998,7 +976,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator>>(tvec3<T, P> const & v, T const & scalar)
GLM_FUNC_QUALIFIER tvec3<T, P> operator>>(tvec3<T, P> const & v, T scalar)
{
return tvec3<T, P>(
v.x >> scalar,
@ -1016,7 +994,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec3<T, P> operator>>(T const & scalar, tvec3<T, P> const & v)
GLM_FUNC_QUALIFIER tvec3<T, P> operator>>(T scalar, tvec3<T, P> const & v)
{
return tvec3<T, P>(
scalar >> v.x,

View file

@ -346,7 +346,7 @@ namespace detail
// -- Binary operators --
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v, const T& scalar);
GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v1, tvec1<T, P> const & v2);
@ -361,7 +361,7 @@ namespace detail
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, const T& scalar);
GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v1, tvec1<T, P> const & v2);
@ -376,7 +376,7 @@ namespace detail
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, const T& scalar);
GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v1, tvec1<T, P> const & v2);
@ -391,16 +391,16 @@ namespace detail
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, const T& scalar);
GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v, T scalar);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v, tvec1<T, P> const & scalar);
GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec1<T, P> const & v2);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator/(T scalar, tvec4<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator/(tvec1<T, P> const & scalar, tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> operator/(tvec1<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 & v1, tvec4<T, P> const & v2);

View file

@ -213,14 +213,14 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_QUALIFIER T & tvec4<T, P>::operator[](typename tvec4<T, P>::length_type i)
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
assert(i >= 0 && i < this->length());
return (&x)[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T const & tvec4<T, P>::operator[](typename tvec4<T, P>::length_type i) const
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
assert(i >= 0 && i < this->length());
return (&x)[i];
}
@ -642,7 +642,7 @@ namespace glm
// -- Binary arithmetic operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v, const T& scalar)
GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v, T scalar)
{
return tvec4<T, P>(
v.x + scalar,
@ -692,7 +692,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v, const T& scalar)
GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v, T scalar)
{
return tvec4<T, P>(
v.x - scalar,
@ -742,7 +742,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v, const T& scalar)
GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v, T scalar)
{
return tvec4<T, P>(
v.x * scalar,
@ -792,7 +792,7 @@ namespace glm
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v, const T& scalar)
GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v, T scalar)
{
return tvec4<T, P>(
v.x / scalar,
@ -801,6 +801,16 @@ namespace glm
v.w / scalar);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec1<T, P> const & v2)
{
return tvec4<T, P>(
v1.x / v2.x,
v1.y / v2.x,
v1.z / v2.x,
v1.w / v2.x);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator/(T scalar, tvec4<T, P> const & v)
{
@ -811,6 +821,16 @@ namespace glm
scalar / v.w);
}
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator/(tvec1<T, P> const & v1, tvec4<T, P> const & v2)
{
return tvec4<T, P>(
v1.x / v2.x,
v1.x / v2.y,
v1.x / v2.z,
v1.x / v2.w);
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
{

View file

@ -40,10 +40,10 @@ namespace glm
typename genType::row_type const & x
)
{
assert(index >= 0 && static_cast<detail::component_count_t>(index) < detail::component_count(m[0]));
assert(index >= 0 && index < m[0].length());
genType Result = m;
for(detail::component_count_t i = 0; i < detail::component_count(m); ++i)
for(length_t i = 0; i < m.length(); ++i)
Result[i][index] = x[i];
return Result;
}
@ -55,10 +55,10 @@ namespace glm
length_t index
)
{
assert(index >= 0 && static_cast<detail::component_count_t>(index) < detail::component_count(m[0]));
assert(index >= 0 && index < m[0].length());
typename genType::row_type Result;
for(detail::component_count_t i = 0; i < detail::component_count(m); ++i)
for(length_t i = 0; i < m.length(); ++i)
Result[i] = m[i][index];
return Result;
}
@ -71,7 +71,7 @@ namespace glm
typename genType::col_type const & x
)
{
assert(index >= 0 && static_cast<detail::component_count_t>(index) < detail::component_count(m));
assert(index >= 0 && index < m.length());
genType Result = m;
Result[index] = x;
@ -85,7 +85,7 @@ namespace glm
length_t index
)
{
assert(index >= 0 && static_cast<detail::component_count_t>(index) < detail::component_count(m));
assert(index >= 0 && index < m.length());
return m[index];
}

View file

@ -170,6 +170,14 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL tquat<T, P> operator/(tquat<T, P> const & q, T const & s);
// -- Boolean operators --
template <typename T, precision P>
GLM_FUNC_DECL bool operator==(tquat<T, P> const & q1, tquat<T, P> const & q2);
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tquat<T, P> const & q1, tquat<T, P> const & q2);
/// Returns the length of the quaternion.
///
/// @see gtc_quaternion

View file

@ -60,14 +60,14 @@ namespace detail
template <typename T, precision P>
GLM_FUNC_QUALIFIER T & tquat<T, P>::operator[](typename tquat<T, P>::length_type i)
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
assert(i >= 0 && i < this->length());
return (&x)[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER T const & tquat<T, P>::operator[](typename tquat<T, P>::length_type i) const
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
assert(i >= 0 && i < this->length());
return (&x)[i];
}
@ -717,7 +717,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<bool, P> lessThan(tquat<T, P> const & x, tquat<T, P> const & y)
{
tvec4<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] < y[i];
return Result;
}
@ -726,7 +726,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<bool, P> lessThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
{
tvec4<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] <= y[i];
return Result;
}
@ -735,7 +735,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<bool, P> greaterThan(tquat<T, P> const & x, tquat<T, P> const & y)
{
tvec4<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] > y[i];
return Result;
}
@ -744,7 +744,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<bool, P> greaterThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
{
tvec4<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] >= y[i];
return Result;
}
@ -753,7 +753,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<bool, P> equal(tquat<T, P> const & x, tquat<T, P> const & y)
{
tvec4<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] == y[i];
return Result;
}
@ -762,7 +762,7 @@ namespace detail
GLM_FUNC_QUALIFIER tvec4<bool, P> notEqual(tquat<T, P> const & x, tquat<T, P> const & y)
{
tvec4<bool, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] != y[i];
return Result;
}

View file

@ -232,7 +232,7 @@ namespace glm
GLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x)
{
vecType<T, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = next_float(x[i]);
return Result;
}
@ -267,7 +267,7 @@ namespace glm
GLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x)
{
vecType<T, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = prev_float(x[i]);
return Result;
}
@ -285,7 +285,7 @@ namespace glm
GLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)
{
vecType<T, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = next_float(x[i], ulps[i]);
return Result;
}
@ -303,7 +303,7 @@ namespace glm
GLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)
{
vecType<T, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = prev_float(x[i], ulps[i]);
return Result;
}
@ -343,7 +343,7 @@ namespace glm
GLM_FUNC_QUALIFIER vecType<uint, P> float_distance(vecType<T, P> const & x, vecType<T, P> const & y)
{
vecType<uint, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = float_distance(x[i], y[i]);
return Result;
}

View file

@ -47,7 +47,7 @@ GLM_FUNC_QUALIFIER tvec2<U, P> associatedMin
)
{
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] < y[i] ? a[i] : b[i];
return Result;
}
@ -60,7 +60,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
)
{
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x < y ? a[i] : b[i];
return Result;
}
@ -73,7 +73,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
)
{
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] < y[i] ? a : b;
return Result;
}
@ -100,7 +100,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
)
{
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]);
return Result;
}
@ -134,7 +134,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
)
{
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
{
T Test1 = min(x[i], y[i]);
T Test2 = min(z[i], w[i]);
@ -159,7 +159,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
T Test2 = min(z, w);
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
{
U Result1 = x < y ? a[i] : b[i];
U Result2 = z < w ? c[i] : d[i];
@ -179,7 +179,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
)
{
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
{
T Test1 = min(x[i], y[i]);
T Test2 = min(z[i], w[i]);;
@ -206,7 +206,7 @@ GLM_FUNC_QUALIFIER tvec2<U, P> associatedMax
)
{
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] > y[i] ? a[i] : b[i];
return Result;
}
@ -220,7 +220,7 @@ GLM_FUNC_QUALIFIER vecType<T, P> associatedMax
)
{
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x > y ? a[i] : b[i];
return Result;
}
@ -234,7 +234,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
)
{
vecType<T, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] > y[i] ? a : b;
return Result;
}
@ -262,7 +262,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
)
{
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]);
return Result;
}
@ -277,7 +277,7 @@ GLM_FUNC_QUALIFIER vecType<T, P> associatedMax
)
{
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]);
return Result;
}
@ -292,7 +292,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
)
{
vecType<T, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c);
return Result;
}
@ -326,7 +326,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
)
{
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
{
T Test1 = max(x[i], y[i]);
T Test2 = max(z[i], w[i]);
@ -351,7 +351,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
T Test2 = max(z, w);
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
{
U Result1 = x > y ? a[i] : b[i];
U Result2 = z > w ? c[i] : d[i];
@ -371,7 +371,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
)
{
vecType<U, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
for(length_t i = 0, n = Result.length(); i < n; ++i)
{
T Test1 = max(x[i], y[i]);
T Test2 = max(z[i], w[i]);;

View file

@ -122,36 +122,36 @@ namespace detail
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T compAdd(vecType<T, P> const & v)
{
T result(0);
for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
result += v[i];
return result;
T Result(0);
for(length_t i = 0, n = v.length(); i < n; ++i)
Result += v[i];
return Result;
}
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T compMul(vecType<T, P> const & v)
{
T result(1);
for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
result *= v[i];
return result;
T Result(1);
for(length_t i = 0, n = v.length(); i < n; ++i)
Result *= v[i];
return Result;
}
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T compMin(vecType<T, P> const & v)
{
T result(v[0]);
for(detail::component_count_t i = 1; i < detail::component_count(v); ++i)
result = min(result, v[i]);
return result;
T Result(v[0]);
for(length_t i = 1, n = v.length(); i < n; ++i)
Result = min(Result, v[i]);
return Result;
}
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER T compMax(vecType<T, P> const & v)
{
T result(v[0]);
for(detail::component_count_t i = 1; i < detail::component_count(v); ++i)
result = max(result, v[i]);
return result;
T Result(v[0]);
for(length_t i = 1, n = v.length(); i < n; ++i)
Result = max(Result, v[i]);
return Result;
}
}//namespace glm

View file

@ -130,16 +130,16 @@ namespace glm
GLM_FUNC_DECL tdualquat<T, P> operator*(tdualquat<T, P> const & q, tdualquat<T, P> const & p);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator*(tquat<T, P> const & q, tvec3<T, P> const & v);
GLM_FUNC_DECL tvec3<T, P> operator*(tdualquat<T, P> const & q, tvec3<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, tquat<T, P> const & q);
GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, tdualquat<T, P> const & q);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator*(tquat<T, P> const & q, tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> operator*(tdualquat<T, P> const & q, tvec4<T, P> const & v);
template <typename T, precision P>
GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, tquat<T, P> const & q);
GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, tdualquat<T, P> const & q);
template <typename T, precision P>
GLM_FUNC_DECL tdualquat<T, P> operator*(tdualquat<T, P> const & q, T const & s);
@ -150,6 +150,14 @@ namespace glm
template <typename T, precision P>
GLM_FUNC_DECL tdualquat<T, P> operator/(tdualquat<T, P> const & q, T const & s);
// -- Boolean operators --
template <typename T, precision P>
GLM_FUNC_DECL bool operator==(tdualquat<T, P> const & q1, tdualquat<T, P> const & q2);
template <typename T, precision P>
GLM_FUNC_DECL bool operator!=(tdualquat<T, P> const & q1, tdualquat<T, P> const & q2);
/// Returns the normalized quaternion.
///
/// @see gtx_dual_quaternion

View file

@ -37,47 +37,25 @@ namespace glm
{
// -- Component accesses --
# ifdef GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tdualquat<T, P>::size_type tdualquat<T, P>::size() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tdualquat<T, P>::length_type tdualquat<T, P>::length() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type & tdualquat<T, P>::operator[](typename tdualquat<T, P>::size_type i)
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
return (&real)[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type & tdualquat<T, P>::operator[](typename tdualquat<T, P>::length_type i)
{
assert(i >= 0 && i < this->length());
return (&real)[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type const & tdualquat<T, P>::operator[](typename tdualquat<T, P>::size_type i) const
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
return (&real)[i];
}
# else
template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tdualquat<T, P>::length_type tdualquat<T, P>::length() const
{
return 2;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type & tdualquat<T, P>::operator[](typename tdualquat<T, P>::length_type i)
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
return (&real)[i];
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type const & tdualquat<T, P>::operator[](typename tdualquat<T, P>::length_type i) const
{
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
return (&real)[i];
}
# endif//GLM_FORCE_SIZE_FUNC
template <typename T, precision P>
GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type const & tdualquat<T, P>::operator[](typename tdualquat<T, P>::length_type i) const
{
assert(i >= 0 && i < this->length());
return (&real)[i];
}
// -- Implicit basic constructors --
@ -194,11 +172,17 @@ namespace glm
// -- Unary bit operators --
template <typename T, precision P>
GLM_FUNC_QUALIFIER tdualquat<T, P> operator-(tdualquat<T, P> const & q)
GLM_FUNC_QUALIFIER tdualquat<T, P> operator+(tdualquat<T, P> const & q)
{
return q;
}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tdualquat<T, P> operator-(tdualquat<T, P> const & q)
{
return tdualquat<T, P>(-q.real, -q.dual);
}
// -- Binary operators --
template <typename T, precision P>

View file

@ -58,7 +58,7 @@ namespace glm
GLM_FUNC_QUALIFIER vecType<T, P> fastPow(vecType<T, P> const & x, vecType<int, P> const & y)
{
vecType<T, P> Result(uninitialize);
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
for(length_t i = 0, n = x.length(); i < n; ++i)
Result[i] = fastPow(x[i], y[i]);
return Result;
}

View file

@ -36,7 +36,7 @@ namespace glm
GLM_FUNC_QUALIFIER bool isNull(tmat2x2<T, P> const & m, T const & epsilon)
{
bool result = true;
for(detail::component_count_t i = 0; result && i < 2 ; ++i)
for(length_t i = 0; result && i < m.length() ; ++i)
result = isNull(m[i], epsilon);
return result;
}
@ -45,7 +45,7 @@ namespace glm
GLM_FUNC_QUALIFIER bool isNull(tmat3x3<T, P> const & m, T const & epsilon)
{
bool result = true;
for(detail::component_count_t i = 0; result && i < 3 ; ++i)
for(length_t i = 0; result && i < m.length() ; ++i)
result = isNull(m[i], epsilon);
return result;
}
@ -54,7 +54,7 @@ namespace glm
GLM_FUNC_QUALIFIER bool isNull(tmat4x4<T, P> const & m, T const & epsilon)
{
bool result = true;
for(detail::component_count_t i = 0; result && i < 4 ; ++i)
for(length_t i = 0; result && i < m.length() ; ++i)
result = isNull(m[i], epsilon);
return result;
}
@ -63,13 +63,13 @@ namespace glm
GLM_FUNC_QUALIFIER bool isIdentity(matType<T, P> const & m, T const & epsilon)
{
bool result = true;
for(detail::component_count_t i(0); result && i < detail::component_count(m[0]); ++i)
for(length_t i = 0; result && i < m[0].length() ; ++i)
{
for(detail::component_count_t j(0); result && j < i ; ++j)
for(length_t j = 0; result && j < i ; ++j)
result = abs(m[i][j]) <= epsilon;
if(result)
result = abs(m[i][i] - 1) <= epsilon;
for(detail::component_count_t j(i + 1); result && j < detail::component_count(m); ++j)
for(length_t j = i + 1; result && j < m.length(); ++j)
result = abs(m[i][j]) <= epsilon;
}
return result;
@ -79,12 +79,12 @@ namespace glm
GLM_FUNC_QUALIFIER bool isNormalized(tmat2x2<T, P> const & m, T const & epsilon)
{
bool result(true);
for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
for(length_t i = 0; result && i < m.length(); ++i)
result = isNormalized(m[i], epsilon);
for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
for(length_t i = 0; result && i < m.length(); ++i)
{
typename tmat2x2<T, P>::col_type v;
for(detail::component_count_t j(0); j < detail::component_count(m); ++j)
for(length_t j = 0; j < m.length(); ++j)
v[j] = m[j][i];
result = isNormalized(v, epsilon);
}
@ -95,12 +95,12 @@ namespace glm
GLM_FUNC_QUALIFIER bool isNormalized(tmat3x3<T, P> const & m, T const & epsilon)
{
bool result(true);
for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
for(length_t i = 0; result && i < m.length(); ++i)
result = isNormalized(m[i], epsilon);
for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
for(length_t i = 0; result && i < m.length(); ++i)
{
typename tmat3x3<T, P>::col_type v;
for(detail::component_count_t j(0); j < detail::component_count(m); ++j)
for(length_t j = 0; j < m.length(); ++j)
v[j] = m[j][i];
result = isNormalized(v, epsilon);
}
@ -111,12 +111,12 @@ namespace glm
GLM_FUNC_QUALIFIER bool isNormalized(tmat4x4<T, P> const & m, T const & epsilon)
{
bool result(true);
for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
for(length_t i = 0; result && i < m.length(); ++i)
result = isNormalized(m[i], epsilon);
for(detail::component_count_t i(0); result && i < detail::component_count(m); ++i)
for(length_t i = 0; result && i < m.length(); ++i)
{
typename tmat4x4<T, P>::col_type v;
for(detail::component_count_t j(0); j < detail::component_count(m); ++j)
for(length_t j = 0; j < m.length(); ++j)
v[j] = m[j][i];
result = isNormalized(v, epsilon);
}
@ -127,15 +127,15 @@ namespace glm
GLM_FUNC_QUALIFIER bool isOrthogonal(matType<T, P> const & m, T const & epsilon)
{
bool result(true);
for(detail::component_count_t i(0); result && i < detail::component_count(m) - 1; ++i)
for(detail::component_count_t j(i + 1); result && j < detail::component_count(m); ++j)
for(length_t i(0); result && i < m.length() - 1; ++i)
for(length_t j(i + 1); result && j < m.length(); ++j)
result = areOrthogonal(m[i], m[j], epsilon);
if(result)
{
matType<T, P> tmp = transpose(m);
for(detail::component_count_t i(0); result && i < detail::component_count(m) - 1 ; ++i)
for(detail::component_count_t j(i + 1); result && j < detail::component_count(m); ++j)
for(length_t i(0); result && i < m.length() - 1 ; ++i)
for(length_t j(i + 1); result && j < m.length(); ++j)
result = areOrthogonal(tmp[i], tmp[j], epsilon);
}
return result;

View file

@ -48,54 +48,65 @@
#endif
#include "../gtc/type_ptr.hpp"
#include "../gtc/vec1.hpp"
namespace glm{
namespace detail
namespace glm
{
/* The glm types provide a .length() member, but for matrices
this only defines the number of columns, so we need to work around this */
template <typename T, precision P>
detail::component_count_t number_of_elements_(tvec2<T, P> const & v){
return detail::component_count(v);
}
template <typename T, precision P>
detail::component_count_t number_of_elements_(tvec3<T, P> const & v){
return detail::component_count(v);
}
template <typename T, precision P>
detail::component_count_t number_of_elements_(tvec4<T, P> const & v){
return detail::component_count(v);
}
template <typename genType>
detail::component_count_t number_of_elements_(genType const & m){
return detail::component_count(m) * detail::component_count(m[0]);
}
}//namespace
/// @addtogroup gtx_range
/// @{
template <typename T, precision P>
inline length_t components(tvec1<T, P> const & v)
{
return v.length();
}
template <typename T, precision P>
inline length_t components(tvec2<T, P> const & v)
{
return v.length();
}
template <typename T, precision P>
inline length_t components(tvec3<T, P> const & v)
{
return v.length();
}
template <typename T, precision P>
inline length_t components(tvec4<T, P> const & v)
{
return v.length();
}
template <typename genType>
const typename genType::value_type * begin(genType const & v){
inline length_t components(genType const & m)
{
return m.length() * m[0].length();
}
template <typename genType>
inline typename genType::value_type const * begin(genType const & v)
{
return value_ptr(v);
}
template <typename genType>
const typename genType::value_type * end(genType const & v){
return begin(v) + detail::number_of_elements_(v);
inline typename genType::value_type const * end(genType const & v)
{
return begin(v) + components(v);
}
template <typename genType>
typename genType::value_type * begin(genType& v){
inline typename genType::value_type * begin(genType& v)
{
return value_ptr(v);
}
template <typename genType>
typename genType::value_type * end(genType& v){
return begin(v) + detail::number_of_elements_(v);
inline typename genType::value_type * end(genType& v)
{
return begin(v) + components(v);
}
/// @}

View file

@ -76,13 +76,15 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
##### Deprecation:
- Removed GLM_FORCE_SIZE_FUNC define
#### [GLM 0.9.7.4](https://github.com/g-truc/glm/tree/0.9.7) - 2016-XX-XX
#### [GLM 0.9.7.4](https://github.com/g-truc/glm/releases/tag/0.9.7.4) - 2016-03-19
##### Fixes:
- Fixed asinh and atanh warning with C++98 STL #484
- Fixed polar coordinates function latitude #485
- Fixed outerProduct defintions and operator signatures for mat2x4 and vec4 #475
- Fixed eulerAngles precision error, returns NaN #451
- Fixed undefined reference errors #489
- Fixed missing GLM_PLATFORM_CYGWIN declaration #495
- Fixed various undefined reference errors #490
#### [GLM 0.9.7.3](https://github.com/g-truc/glm/releases/tag/0.9.7.3) - 2016-02-21
##### Improvements:

View file

@ -17,7 +17,7 @@ struct type_gni<vecType, T, P>
static bool const is_quat = false;
};
*/
/*
namespace detail
{
template <template <typename, glm::precision> class vec_type>
@ -55,7 +55,7 @@ namespace detail
//static GLM_RELAXED_CONSTEXPR glm::length_t components = 4;
};
}//namespace detail
/*
template <class gen_type>
struct vec_type
{