mirror of
https://github.com/g-truc/glm.git
synced 2024-11-25 18:04:34 +00:00
Merge branch 'constexpr_matrix' of https://github.com/LucasChollet/glm into constexpr-matrix
This commit is contained in:
commit
b372627295
@ -27,7 +27,7 @@ namespace glm
|
|||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
|
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i) GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type & operator[](length_type i) GLM_NOEXCEPT;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
||||||
|
|
||||||
// -- Constructors --
|
// -- Constructors --
|
||||||
@ -73,103 +73,103 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> & operator=(mat<2, 2, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator=(mat<2, 2, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> & operator+=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator+=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> & operator+=(mat<2, 2, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator+=(mat<2, 2, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> & operator-=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator-=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> & operator-=(mat<2, 2, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator-=(mat<2, 2, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> & operator*=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator*=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> & operator*=(mat<2, 2, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator*=(mat<2, 2, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> & operator/=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator/=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> & operator/=(mat<2, 2, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator/=(mat<2, 2, U, Q> const& m);
|
||||||
|
|
||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> & operator++ ();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator++ ();
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> & operator-- ();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> & operator-- ();
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator++(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator++(int);
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator--(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator--(int);
|
||||||
};
|
};
|
||||||
|
|
||||||
// -- Unary operators --
|
// -- Unary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m);
|
||||||
|
|
||||||
// -- Binary operators --
|
// -- Binary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator+(T scalar, mat<2, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator+(T scalar, mat<2, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator-(T scalar, mat<2, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator-(T scalar, mat<2, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator*(mat<2, 2, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator*(mat<2, 2, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator*(T scalar, mat<2, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator*(T scalar, mat<2, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<2, 2, T, Q>::col_type operator*(mat<2, 2, T, Q> const& m, typename mat<2, 2, T, Q>::row_type const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 2, T, Q>::col_type operator*(mat<2, 2, T, Q> const& m, typename mat<2, 2, T, Q>::row_type const& v);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<2, 2, T, Q>::row_type operator*(typename mat<2, 2, T, Q>::col_type const& v, mat<2, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 2, T, Q>::row_type operator*(typename mat<2, 2, T, Q>::col_type const& v, mat<2, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator/(T scalar, mat<2, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator/(T scalar, mat<2, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<2, 2, T, Q>::col_type operator/(mat<2, 2, T, Q> const& m, typename mat<2, 2, T, Q>::row_type const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 2, T, Q>::col_type operator/(mat<2, 2, T, Q> const& m, typename mat<2, 2, T, Q>::row_type const& v);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<2, 2, T, Q>::row_type operator/(typename mat<2, 2, T, Q>::col_type const& v, mat<2, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 2, T, Q>::row_type operator/(typename mat<2, 2, T, Q>::col_type const& v, mat<2, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||||
|
|
||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator==(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator!=(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||||
} //namespace glm
|
} //namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
|
@ -217,7 +217,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<2, 2, T, Q>::col_type& mat<2, 2, T, Q>::operator[](typename mat<2, 2, T, Q>::length_type i) GLM_NOEXCEPT
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 2, T, Q>::col_type& mat<2, 2, T, Q>::operator[](typename mat<2, 2, T, Q>::length_type i) GLM_NOEXCEPT
|
||||||
{
|
{
|
||||||
assert(i < this->length());
|
assert(i < this->length());
|
||||||
return this->value[i];
|
return this->value[i];
|
||||||
@ -234,7 +234,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator=(mat<2, 2, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator=(mat<2, 2, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] = m[0];
|
this->value[0] = m[0];
|
||||||
this->value[1] = m[1];
|
this->value[1] = m[1];
|
||||||
@ -243,7 +243,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator+=(U scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator+=(U scalar)
|
||||||
{
|
{
|
||||||
this->value[0] += scalar;
|
this->value[0] += scalar;
|
||||||
this->value[1] += scalar;
|
this->value[1] += scalar;
|
||||||
@ -252,7 +252,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator+=(mat<2, 2, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator+=(mat<2, 2, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] += m[0];
|
this->value[0] += m[0];
|
||||||
this->value[1] += m[1];
|
this->value[1] += m[1];
|
||||||
@ -261,7 +261,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator-=(U scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator-=(U scalar)
|
||||||
{
|
{
|
||||||
this->value[0] -= scalar;
|
this->value[0] -= scalar;
|
||||||
this->value[1] -= scalar;
|
this->value[1] -= scalar;
|
||||||
@ -270,7 +270,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator-=(mat<2, 2, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator-=(mat<2, 2, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] -= m[0];
|
this->value[0] -= m[0];
|
||||||
this->value[1] -= m[1];
|
this->value[1] -= m[1];
|
||||||
@ -279,7 +279,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator*=(U scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator*=(U scalar)
|
||||||
{
|
{
|
||||||
this->value[0] *= scalar;
|
this->value[0] *= scalar;
|
||||||
this->value[1] *= scalar;
|
this->value[1] *= scalar;
|
||||||
@ -288,14 +288,14 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator*=(mat<2, 2, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator*=(mat<2, 2, U, Q> const& m)
|
||||||
{
|
{
|
||||||
return (*this = *this * m);
|
return (*this = *this * m);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator/=(U scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator/=(U scalar)
|
||||||
{
|
{
|
||||||
this->value[0] /= scalar;
|
this->value[0] /= scalar;
|
||||||
this->value[1] /= scalar;
|
this->value[1] /= scalar;
|
||||||
@ -304,7 +304,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator/=(mat<2, 2, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator/=(mat<2, 2, U, Q> const& m)
|
||||||
{
|
{
|
||||||
return *this *= inverse(m);
|
return *this *= inverse(m);
|
||||||
}
|
}
|
||||||
@ -312,7 +312,7 @@ namespace glm
|
|||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator++()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator++()
|
||||||
{
|
{
|
||||||
++this->value[0];
|
++this->value[0];
|
||||||
++this->value[1];
|
++this->value[1];
|
||||||
@ -320,7 +320,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator--()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q>& mat<2, 2, T, Q>::operator--()
|
||||||
{
|
{
|
||||||
--this->value[0];
|
--this->value[0];
|
||||||
--this->value[1];
|
--this->value[1];
|
||||||
@ -328,7 +328,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> mat<2, 2, T, Q>::operator++(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> mat<2, 2, T, Q>::operator++(int)
|
||||||
{
|
{
|
||||||
mat<2, 2, T, Q> Result(*this);
|
mat<2, 2, T, Q> Result(*this);
|
||||||
++*this;
|
++*this;
|
||||||
@ -336,7 +336,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> mat<2, 2, T, Q>::operator--(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> mat<2, 2, T, Q>::operator--(int)
|
||||||
{
|
{
|
||||||
mat<2, 2, T, Q> Result(*this);
|
mat<2, 2, T, Q> Result(*this);
|
||||||
--*this;
|
--*this;
|
||||||
@ -346,13 +346,13 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<2, 2, T, Q>(
|
return mat<2, 2, T, Q>(
|
||||||
-m[0],
|
-m[0],
|
||||||
@ -362,7 +362,7 @@ namespace glm
|
|||||||
// -- Binary arithmetic operators --
|
// -- Binary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<2, 2, T, Q>(
|
return mat<2, 2, T, Q>(
|
||||||
m[0] + scalar,
|
m[0] + scalar,
|
||||||
@ -370,7 +370,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator+(T scalar, mat<2, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator+(T scalar, mat<2, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<2, 2, T, Q>(
|
return mat<2, 2, T, Q>(
|
||||||
m[0] + scalar,
|
m[0] + scalar,
|
||||||
@ -378,7 +378,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator+(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 2, T, Q>(
|
return mat<2, 2, T, Q>(
|
||||||
m1[0] + m2[0],
|
m1[0] + m2[0],
|
||||||
@ -386,7 +386,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<2, 2, T, Q>(
|
return mat<2, 2, T, Q>(
|
||||||
m[0] - scalar,
|
m[0] - scalar,
|
||||||
@ -394,7 +394,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator-(T scalar, mat<2, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator-(T scalar, mat<2, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<2, 2, T, Q>(
|
return mat<2, 2, T, Q>(
|
||||||
scalar - m[0],
|
scalar - m[0],
|
||||||
@ -402,7 +402,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 2, T, Q>(
|
return mat<2, 2, T, Q>(
|
||||||
m1[0] - m2[0],
|
m1[0] - m2[0],
|
||||||
@ -410,7 +410,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator*(mat<2, 2, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator*(mat<2, 2, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<2, 2, T, Q>(
|
return mat<2, 2, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -418,7 +418,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator*(T scalar, mat<2, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator*(T scalar, mat<2, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<2, 2, T, Q>(
|
return mat<2, 2, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -426,7 +426,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<2, 2, T, Q>::col_type operator*
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 2, T, Q>::col_type operator*
|
||||||
(
|
(
|
||||||
mat<2, 2, T, Q> const& m,
|
mat<2, 2, T, Q> const& m,
|
||||||
typename mat<2, 2, T, Q>::row_type const& v
|
typename mat<2, 2, T, Q>::row_type const& v
|
||||||
@ -438,7 +438,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<2, 2, T, Q>::row_type operator*
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 2, T, Q>::row_type operator*
|
||||||
(
|
(
|
||||||
typename mat<2, 2, T, Q>::col_type const& v,
|
typename mat<2, 2, T, Q>::col_type const& v,
|
||||||
mat<2, 2, T, Q> const& m
|
mat<2, 2, T, Q> const& m
|
||||||
@ -450,7 +450,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 2, T, Q>(
|
return mat<2, 2, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
||||||
@ -460,7 +460,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<3, 2, T, Q>(
|
return mat<3, 2, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
||||||
@ -472,7 +472,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<2, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<4, 2, T, Q>(
|
return mat<4, 2, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
||||||
@ -486,7 +486,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<2, 2, T, Q>(
|
return mat<2, 2, T, Q>(
|
||||||
m[0] / scalar,
|
m[0] / scalar,
|
||||||
@ -494,7 +494,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator/(T scalar, mat<2, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator/(T scalar, mat<2, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<2, 2, T, Q>(
|
return mat<2, 2, T, Q>(
|
||||||
scalar / m[0],
|
scalar / m[0],
|
||||||
@ -502,19 +502,19 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<2, 2, T, Q>::col_type operator/(mat<2, 2, T, Q> const& m, typename mat<2, 2, T, Q>::row_type const& v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 2, T, Q>::col_type operator/(mat<2, 2, T, Q> const& m, typename mat<2, 2, T, Q>::row_type const& v)
|
||||||
{
|
{
|
||||||
return inverse(m) * v;
|
return inverse(m) * v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<2, 2, T, Q>::row_type operator/(typename mat<2, 2, T, Q>::col_type const& v, mat<2, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 2, T, Q>::row_type operator/(typename mat<2, 2, T, Q>::col_type const& v, mat<2, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return v * inverse(m);
|
return v * inverse(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
mat<2, 2, T, Q> m1_copy(m1);
|
mat<2, 2, T, Q> m1_copy(m1);
|
||||||
return m1_copy /= m2;
|
return m1_copy /= m2;
|
||||||
@ -523,13 +523,13 @@ namespace glm
|
|||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator==(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]);
|
return (m1[0] == m2[0]) && (m1[1] == m2[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator!=(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]);
|
return (m1[0] != m2[0]) || (m1[1] != m2[1]);
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ namespace glm
|
|||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
|
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i) GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type & operator[](length_type i) GLM_NOEXCEPT;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
||||||
|
|
||||||
// -- Constructors --
|
// -- Constructors --
|
||||||
@ -74,84 +74,84 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> & operator=(mat<2, 3, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator=(mat<2, 3, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> & operator+=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator+=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> & operator+=(mat<2, 3, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator+=(mat<2, 3, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> & operator-=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator-=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> & operator-=(mat<2, 3, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator-=(mat<2, 3, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> & operator*=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator*=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> & operator/=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator/=(U s);
|
||||||
|
|
||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> & operator++ ();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator++ ();
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> & operator-- ();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> & operator-- ();
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator++(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator++(int);
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator--(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator--(int);
|
||||||
};
|
};
|
||||||
|
|
||||||
// -- Unary operators --
|
// -- Unary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m);
|
||||||
|
|
||||||
// -- Binary operators --
|
// -- Binary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator*(T scalar, mat<2, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator*(T scalar, mat<2, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<2, 3, T, Q>::col_type operator*(mat<2, 3, T, Q> const& m, typename mat<2, 3, T, Q>::row_type const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 3, T, Q>::col_type operator*(mat<2, 3, T, Q> const& m, typename mat<2, 3, T, Q>::row_type const& v);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<2, 3, T, Q>::row_type operator*(typename mat<2, 3, T, Q>::col_type const& v, mat<2, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 3, T, Q>::row_type operator*(typename mat<2, 3, T, Q>::col_type const& v, mat<2, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator/(mat<2, 3, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator/(mat<2, 3, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator/(T scalar, mat<2, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator/(T scalar, mat<2, 3, T, Q> const& m);
|
||||||
|
|
||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator==(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator!=(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
|
@ -217,7 +217,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<2, 3, T, Q>::col_type & mat<2, 3, T, Q>::operator[](typename mat<2, 3, T, Q>::length_type i) GLM_NOEXCEPT
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 3, T, Q>::col_type & mat<2, 3, T, Q>::operator[](typename mat<2, 3, T, Q>::length_type i) GLM_NOEXCEPT
|
||||||
{
|
{
|
||||||
assert(i < this->length());
|
assert(i < this->length());
|
||||||
return this->value[i];
|
return this->value[i];
|
||||||
@ -234,7 +234,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator=(mat<2, 3, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator=(mat<2, 3, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] = m[0];
|
this->value[0] = m[0];
|
||||||
this->value[1] = m[1];
|
this->value[1] = m[1];
|
||||||
@ -243,7 +243,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> & mat<2, 3, T, Q>::operator+=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> & mat<2, 3, T, Q>::operator+=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] += s;
|
this->value[0] += s;
|
||||||
this->value[1] += s;
|
this->value[1] += s;
|
||||||
@ -252,7 +252,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator+=(mat<2, 3, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator+=(mat<2, 3, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] += m[0];
|
this->value[0] += m[0];
|
||||||
this->value[1] += m[1];
|
this->value[1] += m[1];
|
||||||
@ -261,7 +261,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator-=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator-=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] -= s;
|
this->value[0] -= s;
|
||||||
this->value[1] -= s;
|
this->value[1] -= s;
|
||||||
@ -270,7 +270,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator-=(mat<2, 3, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator-=(mat<2, 3, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] -= m[0];
|
this->value[0] -= m[0];
|
||||||
this->value[1] -= m[1];
|
this->value[1] -= m[1];
|
||||||
@ -279,7 +279,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator*=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q>& mat<2, 3, T, Q>::operator*=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] *= s;
|
this->value[0] *= s;
|
||||||
this->value[1] *= s;
|
this->value[1] *= s;
|
||||||
@ -288,7 +288,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> & mat<2, 3, T, Q>::operator/=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> & mat<2, 3, T, Q>::operator/=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] /= s;
|
this->value[0] /= s;
|
||||||
this->value[1] /= s;
|
this->value[1] /= s;
|
||||||
@ -298,7 +298,7 @@ namespace glm
|
|||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> & mat<2, 3, T, Q>::operator++()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> & mat<2, 3, T, Q>::operator++()
|
||||||
{
|
{
|
||||||
++this->value[0];
|
++this->value[0];
|
||||||
++this->value[1];
|
++this->value[1];
|
||||||
@ -306,7 +306,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> & mat<2, 3, T, Q>::operator--()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> & mat<2, 3, T, Q>::operator--()
|
||||||
{
|
{
|
||||||
--this->value[0];
|
--this->value[0];
|
||||||
--this->value[1];
|
--this->value[1];
|
||||||
@ -314,7 +314,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> mat<2, 3, T, Q>::operator++(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> mat<2, 3, T, Q>::operator++(int)
|
||||||
{
|
{
|
||||||
mat<2, 3, T, Q> Result(*this);
|
mat<2, 3, T, Q> Result(*this);
|
||||||
++*this;
|
++*this;
|
||||||
@ -322,7 +322,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> mat<2, 3, T, Q>::operator--(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> mat<2, 3, T, Q>::operator--(int)
|
||||||
{
|
{
|
||||||
mat<2, 3, T, Q> Result(*this);
|
mat<2, 3, T, Q> Result(*this);
|
||||||
--*this;
|
--*this;
|
||||||
@ -332,13 +332,13 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<2, 3, T, Q>(
|
return mat<2, 3, T, Q>(
|
||||||
-m[0],
|
-m[0],
|
||||||
@ -348,7 +348,7 @@ namespace glm
|
|||||||
// -- Binary arithmetic operators --
|
// -- Binary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<2, 3, T, Q>(
|
return mat<2, 3, T, Q>(
|
||||||
m[0] + scalar,
|
m[0] + scalar,
|
||||||
@ -356,7 +356,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 3, T, Q>(
|
return mat<2, 3, T, Q>(
|
||||||
m1[0] + m2[0],
|
m1[0] + m2[0],
|
||||||
@ -364,7 +364,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<2, 3, T, Q>(
|
return mat<2, 3, T, Q>(
|
||||||
m[0] - scalar,
|
m[0] - scalar,
|
||||||
@ -372,7 +372,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 3, T, Q>(
|
return mat<2, 3, T, Q>(
|
||||||
m1[0] - m2[0],
|
m1[0] - m2[0],
|
||||||
@ -380,7 +380,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<2, 3, T, Q>(
|
return mat<2, 3, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -388,7 +388,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator*(T scalar, mat<2, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator*(T scalar, mat<2, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<2, 3, T, Q>(
|
return mat<2, 3, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -396,7 +396,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<2, 3, T, Q>::col_type operator*
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 3, T, Q>::col_type operator*
|
||||||
(
|
(
|
||||||
mat<2, 3, T, Q> const& m,
|
mat<2, 3, T, Q> const& m,
|
||||||
typename mat<2, 3, T, Q>::row_type const& v)
|
typename mat<2, 3, T, Q>::row_type const& v)
|
||||||
@ -408,7 +408,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<2, 3, T, Q>::row_type operator*
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 3, T, Q>::row_type operator*
|
||||||
(
|
(
|
||||||
typename mat<2, 3, T, Q>::col_type const& v,
|
typename mat<2, 3, T, Q>::col_type const& v,
|
||||||
mat<2, 3, T, Q> const& m)
|
mat<2, 3, T, Q> const& m)
|
||||||
@ -419,7 +419,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 3, T, Q>(
|
return mat<2, 3, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
||||||
@ -431,7 +431,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
T SrcA00 = m1[0][0];
|
T SrcA00 = m1[0][0];
|
||||||
T SrcA01 = m1[0][1];
|
T SrcA01 = m1[0][1];
|
||||||
@ -461,7 +461,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<2, 3, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<4, 3, T, Q>(
|
return mat<4, 3, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
||||||
@ -479,7 +479,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator/(mat<2, 3, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator/(mat<2, 3, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<2, 3, T, Q>(
|
return mat<2, 3, T, Q>(
|
||||||
m[0] / scalar,
|
m[0] / scalar,
|
||||||
@ -487,7 +487,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator/(T scalar, mat<2, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator/(T scalar, mat<2, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<2, 3, T, Q>(
|
return mat<2, 3, T, Q>(
|
||||||
scalar / m[0],
|
scalar / m[0],
|
||||||
@ -497,13 +497,13 @@ namespace glm
|
|||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator==(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]);
|
return (m1[0] == m2[0]) && (m1[1] == m2[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator!=(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]);
|
return (m1[0] != m2[0]) || (m1[1] != m2[1]);
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ namespace glm
|
|||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
|
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; }
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i) GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type & operator[](length_type i) GLM_NOEXCEPT;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
||||||
|
|
||||||
// -- Constructors --
|
// -- Constructors --
|
||||||
@ -76,84 +76,84 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> & operator=(mat<2, 4, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator=(mat<2, 4, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> & operator+=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator+=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> & operator+=(mat<2, 4, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator+=(mat<2, 4, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> & operator-=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator-=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> & operator-=(mat<2, 4, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator-=(mat<2, 4, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> & operator*=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator*=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> & operator/=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator/=(U s);
|
||||||
|
|
||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> & operator++ ();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator++ ();
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> & operator-- ();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> & operator-- ();
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator++(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator++(int);
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator--(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator--(int);
|
||||||
};
|
};
|
||||||
|
|
||||||
// -- Unary operators --
|
// -- Unary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m);
|
||||||
|
|
||||||
// -- Binary operators --
|
// -- Binary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator*(T scalar, mat<2, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator*(T scalar, mat<2, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<2, 4, T, Q>::col_type operator*(mat<2, 4, T, Q> const& m, typename mat<2, 4, T, Q>::row_type const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 4, T, Q>::col_type operator*(mat<2, 4, T, Q> const& m, typename mat<2, 4, T, Q>::row_type const& v);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<2, 4, T, Q>::row_type operator*(typename mat<2, 4, T, Q>::col_type const& v, mat<2, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<2, 4, T, Q>::row_type operator*(typename mat<2, 4, T, Q>::col_type const& v, mat<2, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<2, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator/(mat<2, 4, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator/(mat<2, 4, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator/(T scalar, mat<2, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator/(T scalar, mat<2, 4, T, Q> const& m);
|
||||||
|
|
||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator==(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator!=(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
|
@ -219,7 +219,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<2, 4, T, Q>::col_type & mat<2, 4, T, Q>::operator[](typename mat<2, 4, T, Q>::length_type i) GLM_NOEXCEPT
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 4, T, Q>::col_type & mat<2, 4, T, Q>::operator[](typename mat<2, 4, T, Q>::length_type i) GLM_NOEXCEPT
|
||||||
{
|
{
|
||||||
assert(i < this->length());
|
assert(i < this->length());
|
||||||
return this->value[i];
|
return this->value[i];
|
||||||
@ -236,7 +236,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator=(mat<2, 4, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator=(mat<2, 4, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] = m[0];
|
this->value[0] = m[0];
|
||||||
this->value[1] = m[1];
|
this->value[1] = m[1];
|
||||||
@ -245,7 +245,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator+=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator+=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] += s;
|
this->value[0] += s;
|
||||||
this->value[1] += s;
|
this->value[1] += s;
|
||||||
@ -254,7 +254,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator+=(mat<2, 4, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator+=(mat<2, 4, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] += m[0];
|
this->value[0] += m[0];
|
||||||
this->value[1] += m[1];
|
this->value[1] += m[1];
|
||||||
@ -263,7 +263,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator-=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator-=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] -= s;
|
this->value[0] -= s;
|
||||||
this->value[1] -= s;
|
this->value[1] -= s;
|
||||||
@ -272,7 +272,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator-=(mat<2, 4, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator-=(mat<2, 4, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] -= m[0];
|
this->value[0] -= m[0];
|
||||||
this->value[1] -= m[1];
|
this->value[1] -= m[1];
|
||||||
@ -281,7 +281,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator*=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator*=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] *= s;
|
this->value[0] *= s;
|
||||||
this->value[1] *= s;
|
this->value[1] *= s;
|
||||||
@ -290,7 +290,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> & mat<2, 4, T, Q>::operator/=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> & mat<2, 4, T, Q>::operator/=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] /= s;
|
this->value[0] /= s;
|
||||||
this->value[1] /= s;
|
this->value[1] /= s;
|
||||||
@ -300,7 +300,7 @@ namespace glm
|
|||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator++()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator++()
|
||||||
{
|
{
|
||||||
++this->value[0];
|
++this->value[0];
|
||||||
++this->value[1];
|
++this->value[1];
|
||||||
@ -308,7 +308,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator--()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q>& mat<2, 4, T, Q>::operator--()
|
||||||
{
|
{
|
||||||
--this->value[0];
|
--this->value[0];
|
||||||
--this->value[1];
|
--this->value[1];
|
||||||
@ -316,7 +316,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> mat<2, 4, T, Q>::operator++(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> mat<2, 4, T, Q>::operator++(int)
|
||||||
{
|
{
|
||||||
mat<2, 4, T, Q> Result(*this);
|
mat<2, 4, T, Q> Result(*this);
|
||||||
++*this;
|
++*this;
|
||||||
@ -324,7 +324,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> mat<2, 4, T, Q>::operator--(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> mat<2, 4, T, Q>::operator--(int)
|
||||||
{
|
{
|
||||||
mat<2, 4, T, Q> Result(*this);
|
mat<2, 4, T, Q> Result(*this);
|
||||||
--*this;
|
--*this;
|
||||||
@ -334,13 +334,13 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<2, 4, T, Q>(
|
return mat<2, 4, T, Q>(
|
||||||
-m[0],
|
-m[0],
|
||||||
@ -350,7 +350,7 @@ namespace glm
|
|||||||
// -- Binary arithmetic operators --
|
// -- Binary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<2, 4, T, Q>(
|
return mat<2, 4, T, Q>(
|
||||||
m[0] + scalar,
|
m[0] + scalar,
|
||||||
@ -358,7 +358,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 4, T, Q>(
|
return mat<2, 4, T, Q>(
|
||||||
m1[0] + m2[0],
|
m1[0] + m2[0],
|
||||||
@ -366,7 +366,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<2, 4, T, Q>(
|
return mat<2, 4, T, Q>(
|
||||||
m[0] - scalar,
|
m[0] - scalar,
|
||||||
@ -374,7 +374,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 4, T, Q>(
|
return mat<2, 4, T, Q>(
|
||||||
m1[0] - m2[0],
|
m1[0] - m2[0],
|
||||||
@ -382,7 +382,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<2, 4, T, Q>(
|
return mat<2, 4, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -390,7 +390,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator*(T scalar, mat<2, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator*(T scalar, mat<2, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<2, 4, T, Q>(
|
return mat<2, 4, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -398,7 +398,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<2, 4, T, Q>::col_type operator*(mat<2, 4, T, Q> const& m, typename mat<2, 4, T, Q>::row_type const& v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 4, T, Q>::col_type operator*(mat<2, 4, T, Q> const& m, typename mat<2, 4, T, Q>::row_type const& v)
|
||||||
{
|
{
|
||||||
return typename mat<2, 4, T, Q>::col_type(
|
return typename mat<2, 4, T, Q>::col_type(
|
||||||
m[0][0] * v.x + m[1][0] * v.y,
|
m[0][0] * v.x + m[1][0] * v.y,
|
||||||
@ -408,7 +408,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<2, 4, T, Q>::row_type operator*(typename mat<2, 4, T, Q>::col_type const& v, mat<2, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<2, 4, T, Q>::row_type operator*(typename mat<2, 4, T, Q>::col_type const& v, mat<2, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return typename mat<2, 4, T, Q>::row_type(
|
return typename mat<2, 4, T, Q>::row_type(
|
||||||
v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3],
|
v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3],
|
||||||
@ -416,7 +416,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
T SrcA00 = m1[0][0];
|
T SrcA00 = m1[0][0];
|
||||||
T SrcA01 = m1[0][1];
|
T SrcA01 = m1[0][1];
|
||||||
@ -457,7 +457,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 4, T, Q>(
|
return mat<2, 4, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
||||||
@ -471,7 +471,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<2, 4, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<3, 4, T, Q>(
|
return mat<3, 4, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
||||||
@ -489,7 +489,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator/(mat<2, 4, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator/(mat<2, 4, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<2, 4, T, Q>(
|
return mat<2, 4, T, Q>(
|
||||||
m[0] / scalar,
|
m[0] / scalar,
|
||||||
@ -497,7 +497,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator/(T scalar, mat<2, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator/(T scalar, mat<2, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<2, 4, T, Q>(
|
return mat<2, 4, T, Q>(
|
||||||
scalar / m[0],
|
scalar / m[0],
|
||||||
@ -507,13 +507,13 @@ namespace glm
|
|||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator==(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]);
|
return (m1[0] == m2[0]) && (m1[1] == m2[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator!=(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]);
|
return (m1[0] != m2[0]) || (m1[1] != m2[1]);
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ namespace glm
|
|||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
|
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i) GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type & operator[](length_type i) GLM_NOEXCEPT;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
||||||
|
|
||||||
// -- Constructors --
|
// -- Constructors --
|
||||||
@ -81,84 +81,84 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> & operator=(mat<3, 2, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator=(mat<3, 2, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> & operator+=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator+=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> & operator+=(mat<3, 2, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator+=(mat<3, 2, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> & operator-=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator-=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> & operator-=(mat<3, 2, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator-=(mat<3, 2, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> & operator*=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator*=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> & operator/=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator/=(U s);
|
||||||
|
|
||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> & operator++ ();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator++ ();
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> & operator-- ();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> & operator-- ();
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator++(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator++(int);
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator--(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator--(int);
|
||||||
};
|
};
|
||||||
|
|
||||||
// -- Unary operators --
|
// -- Unary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m);
|
||||||
|
|
||||||
// -- Binary operators --
|
// -- Binary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator*(T scalar, mat<3, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator*(T scalar, mat<3, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<3, 2, T, Q>::col_type operator*(mat<3, 2, T, Q> const& m, typename mat<3, 2, T, Q>::row_type const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 2, T, Q>::col_type operator*(mat<3, 2, T, Q> const& m, typename mat<3, 2, T, Q>::row_type const& v);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<3, 2, T, Q>::row_type operator*(typename mat<3, 2, T, Q>::col_type const& v, mat<3, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 2, T, Q>::row_type operator*(typename mat<3, 2, T, Q>::col_type const& v, mat<3, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator/(mat<3, 2, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator/(mat<3, 2, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator/(T scalar, mat<3, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator/(T scalar, mat<3, 2, T, Q> const& m);
|
||||||
|
|
||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator==(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator!=(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2);
|
||||||
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<3, 2, T, Q>::col_type & mat<3, 2, T, Q>::operator[](typename mat<3, 2, T, Q>::length_type i) GLM_NOEXCEPT
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 2, T, Q>::col_type & mat<3, 2, T, Q>::operator[](typename mat<3, 2, T, Q>::length_type i) GLM_NOEXCEPT
|
||||||
{
|
{
|
||||||
assert(i < this->length());
|
assert(i < this->length());
|
||||||
return this->value[i];
|
return this->value[i];
|
||||||
@ -253,7 +253,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator=(mat<3, 2, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator=(mat<3, 2, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] = m[0];
|
this->value[0] = m[0];
|
||||||
this->value[1] = m[1];
|
this->value[1] = m[1];
|
||||||
@ -263,7 +263,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator+=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator+=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] += s;
|
this->value[0] += s;
|
||||||
this->value[1] += s;
|
this->value[1] += s;
|
||||||
@ -273,7 +273,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator+=(mat<3, 2, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator+=(mat<3, 2, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] += m[0];
|
this->value[0] += m[0];
|
||||||
this->value[1] += m[1];
|
this->value[1] += m[1];
|
||||||
@ -283,7 +283,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator-=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator-=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] -= s;
|
this->value[0] -= s;
|
||||||
this->value[1] -= s;
|
this->value[1] -= s;
|
||||||
@ -293,7 +293,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator-=(mat<3, 2, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator-=(mat<3, 2, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] -= m[0];
|
this->value[0] -= m[0];
|
||||||
this->value[1] -= m[1];
|
this->value[1] -= m[1];
|
||||||
@ -303,7 +303,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator*=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator*=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] *= s;
|
this->value[0] *= s;
|
||||||
this->value[1] *= s;
|
this->value[1] *= s;
|
||||||
@ -313,7 +313,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> & mat<3, 2, T, Q>::operator/=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> & mat<3, 2, T, Q>::operator/=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] /= s;
|
this->value[0] /= s;
|
||||||
this->value[1] /= s;
|
this->value[1] /= s;
|
||||||
@ -324,7 +324,7 @@ namespace glm
|
|||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator++()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator++()
|
||||||
{
|
{
|
||||||
++this->value[0];
|
++this->value[0];
|
||||||
++this->value[1];
|
++this->value[1];
|
||||||
@ -333,7 +333,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator--()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q>& mat<3, 2, T, Q>::operator--()
|
||||||
{
|
{
|
||||||
--this->value[0];
|
--this->value[0];
|
||||||
--this->value[1];
|
--this->value[1];
|
||||||
@ -342,7 +342,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> mat<3, 2, T, Q>::operator++(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> mat<3, 2, T, Q>::operator++(int)
|
||||||
{
|
{
|
||||||
mat<3, 2, T, Q> Result(*this);
|
mat<3, 2, T, Q> Result(*this);
|
||||||
++*this;
|
++*this;
|
||||||
@ -350,7 +350,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> mat<3, 2, T, Q>::operator--(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> mat<3, 2, T, Q>::operator--(int)
|
||||||
{
|
{
|
||||||
mat<3, 2, T, Q> Result(*this);
|
mat<3, 2, T, Q> Result(*this);
|
||||||
--*this;
|
--*this;
|
||||||
@ -360,13 +360,13 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<3, 2, T, Q>(
|
return mat<3, 2, T, Q>(
|
||||||
-m[0],
|
-m[0],
|
||||||
@ -377,7 +377,7 @@ namespace glm
|
|||||||
// -- Binary arithmetic operators --
|
// -- Binary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<3, 2, T, Q>(
|
return mat<3, 2, T, Q>(
|
||||||
m[0] + scalar,
|
m[0] + scalar,
|
||||||
@ -386,7 +386,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator+(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<3, 2, T, Q>(
|
return mat<3, 2, T, Q>(
|
||||||
m1[0] + m2[0],
|
m1[0] + m2[0],
|
||||||
@ -395,7 +395,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<3, 2, T, Q>(
|
return mat<3, 2, T, Q>(
|
||||||
m[0] - scalar,
|
m[0] - scalar,
|
||||||
@ -404,7 +404,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<3, 2, T, Q>(
|
return mat<3, 2, T, Q>(
|
||||||
m1[0] - m2[0],
|
m1[0] - m2[0],
|
||||||
@ -413,7 +413,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<3, 2, T, Q>(
|
return mat<3, 2, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -422,7 +422,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator*(T scalar, mat<3, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator*(T scalar, mat<3, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<3, 2, T, Q>(
|
return mat<3, 2, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -431,7 +431,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<3, 2, T, Q>::col_type operator*(mat<3, 2, T, Q> const& m, typename mat<3, 2, T, Q>::row_type const& v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 2, T, Q>::col_type operator*(mat<3, 2, T, Q> const& m, typename mat<3, 2, T, Q>::row_type const& v)
|
||||||
{
|
{
|
||||||
return typename mat<3, 2, T, Q>::col_type(
|
return typename mat<3, 2, T, Q>::col_type(
|
||||||
m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
|
m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
|
||||||
@ -439,7 +439,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<3, 2, T, Q>::row_type operator*(typename mat<3, 2, T, Q>::col_type const& v, mat<3, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 2, T, Q>::row_type operator*(typename mat<3, 2, T, Q>::col_type const& v, mat<3, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return typename mat<3, 2, T, Q>::row_type(
|
return typename mat<3, 2, T, Q>::row_type(
|
||||||
v.x * m[0][0] + v.y * m[0][1],
|
v.x * m[0][0] + v.y * m[0][1],
|
||||||
@ -448,7 +448,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
const T SrcA00 = m1[0][0];
|
const T SrcA00 = m1[0][0];
|
||||||
const T SrcA01 = m1[0][1];
|
const T SrcA01 = m1[0][1];
|
||||||
@ -473,7 +473,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<3, 2, T, Q>(
|
return mat<3, 2, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
|
||||||
@ -485,7 +485,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<3, 2, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<4, 2, T, Q>(
|
return mat<4, 2, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
|
||||||
@ -499,7 +499,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator/(mat<3, 2, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator/(mat<3, 2, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<3, 2, T, Q>(
|
return mat<3, 2, T, Q>(
|
||||||
m[0] / scalar,
|
m[0] / scalar,
|
||||||
@ -508,7 +508,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator/(T scalar, mat<3, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator/(T scalar, mat<3, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<3, 2, T, Q>(
|
return mat<3, 2, T, Q>(
|
||||||
scalar / m[0],
|
scalar / m[0],
|
||||||
@ -519,13 +519,13 @@ namespace glm
|
|||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator==(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
|
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator!=(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
|
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ namespace glm
|
|||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
|
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i) GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type & operator[](length_type i) GLM_NOEXCEPT;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
||||||
|
|
||||||
// -- Constructors --
|
// -- Constructors --
|
||||||
@ -80,95 +80,95 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> & operator=(mat<3, 3, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator=(mat<3, 3, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> & operator+=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator+=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> & operator+=(mat<3, 3, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator+=(mat<3, 3, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> & operator-=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator-=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> & operator-=(mat<3, 3, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator-=(mat<3, 3, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> & operator*=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator*=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> & operator*=(mat<3, 3, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator*=(mat<3, 3, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> & operator/=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator/=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> & operator/=(mat<3, 3, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator/=(mat<3, 3, U, Q> const& m);
|
||||||
|
|
||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> & operator++();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator++();
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> & operator--();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> & operator--();
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator++(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator++(int);
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator--(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator--(int);
|
||||||
};
|
};
|
||||||
|
|
||||||
// -- Unary operators --
|
// -- Unary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m);
|
||||||
|
|
||||||
// -- Binary operators --
|
// -- Binary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator+(T scalar, mat<3, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator+(T scalar, mat<3, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator-(T scalar, mat<3, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator-(T scalar, mat<3, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator*(T scalar, mat<3, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator*(T scalar, mat<3, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<3, 3, T, Q>::col_type operator*(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 3, T, Q>::col_type operator*(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<3, 3, T, Q>::row_type operator*(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 3, T, Q>::row_type operator*(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator/(T scalar, mat<3, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator/(T scalar, mat<3, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<3, 3, T, Q>::col_type operator/(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 3, T, Q>::col_type operator/(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<3, 3, T, Q>::row_type operator/(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 3, T, Q>::row_type operator/(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||||
|
|
||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ namespace glm
|
|||||||
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator!=(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
|
@ -238,7 +238,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<3, 3, T, Q>::col_type & mat<3, 3, T, Q>::operator[](typename mat<3, 3, T, Q>::length_type i) GLM_NOEXCEPT
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 3, T, Q>::col_type & mat<3, 3, T, Q>::operator[](typename mat<3, 3, T, Q>::length_type i) GLM_NOEXCEPT
|
||||||
{
|
{
|
||||||
assert(i < this->length());
|
assert(i < this->length());
|
||||||
return this->value[i];
|
return this->value[i];
|
||||||
@ -255,7 +255,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator=(mat<3, 3, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator=(mat<3, 3, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] = m[0];
|
this->value[0] = m[0];
|
||||||
this->value[1] = m[1];
|
this->value[1] = m[1];
|
||||||
@ -265,7 +265,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator+=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator+=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] += s;
|
this->value[0] += s;
|
||||||
this->value[1] += s;
|
this->value[1] += s;
|
||||||
@ -275,7 +275,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator+=(mat<3, 3, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator+=(mat<3, 3, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] += m[0];
|
this->value[0] += m[0];
|
||||||
this->value[1] += m[1];
|
this->value[1] += m[1];
|
||||||
@ -285,7 +285,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator-=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator-=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] -= s;
|
this->value[0] -= s;
|
||||||
this->value[1] -= s;
|
this->value[1] -= s;
|
||||||
@ -295,7 +295,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator-=(mat<3, 3, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator-=(mat<3, 3, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] -= m[0];
|
this->value[0] -= m[0];
|
||||||
this->value[1] -= m[1];
|
this->value[1] -= m[1];
|
||||||
@ -305,7 +305,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator*=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator*=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] *= s;
|
this->value[0] *= s;
|
||||||
this->value[1] *= s;
|
this->value[1] *= s;
|
||||||
@ -315,14 +315,14 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator*=(mat<3, 3, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator*=(mat<3, 3, U, Q> const& m)
|
||||||
{
|
{
|
||||||
return (*this = *this * m);
|
return (*this = *this * m);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator/=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator/=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] /= s;
|
this->value[0] /= s;
|
||||||
this->value[1] /= s;
|
this->value[1] /= s;
|
||||||
@ -332,7 +332,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator/=(mat<3, 3, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator/=(mat<3, 3, U, Q> const& m)
|
||||||
{
|
{
|
||||||
return *this *= inverse(m);
|
return *this *= inverse(m);
|
||||||
}
|
}
|
||||||
@ -340,7 +340,7 @@ namespace glm
|
|||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator++()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator++()
|
||||||
{
|
{
|
||||||
++this->value[0];
|
++this->value[0];
|
||||||
++this->value[1];
|
++this->value[1];
|
||||||
@ -349,7 +349,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator--()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> & mat<3, 3, T, Q>::operator--()
|
||||||
{
|
{
|
||||||
--this->value[0];
|
--this->value[0];
|
||||||
--this->value[1];
|
--this->value[1];
|
||||||
@ -358,7 +358,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> mat<3, 3, T, Q>::operator++(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> mat<3, 3, T, Q>::operator++(int)
|
||||||
{
|
{
|
||||||
mat<3, 3, T, Q> Result(*this);
|
mat<3, 3, T, Q> Result(*this);
|
||||||
++*this;
|
++*this;
|
||||||
@ -366,7 +366,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> mat<3, 3, T, Q>::operator--(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> mat<3, 3, T, Q>::operator--(int)
|
||||||
{
|
{
|
||||||
mat<3, 3, T, Q> Result(*this);
|
mat<3, 3, T, Q> Result(*this);
|
||||||
--*this;
|
--*this;
|
||||||
@ -376,13 +376,13 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<3, 3, T, Q>(
|
return mat<3, 3, T, Q>(
|
||||||
-m[0],
|
-m[0],
|
||||||
@ -393,7 +393,7 @@ namespace glm
|
|||||||
// -- Binary arithmetic operators --
|
// -- Binary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<3, 3, T, Q>(
|
return mat<3, 3, T, Q>(
|
||||||
m[0] + scalar,
|
m[0] + scalar,
|
||||||
@ -402,7 +402,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator+(T scalar, mat<3, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator+(T scalar, mat<3, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<3, 3, T, Q>(
|
return mat<3, 3, T, Q>(
|
||||||
m[0] + scalar,
|
m[0] + scalar,
|
||||||
@ -411,7 +411,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<3, 3, T, Q>(
|
return mat<3, 3, T, Q>(
|
||||||
m1[0] + m2[0],
|
m1[0] + m2[0],
|
||||||
@ -420,7 +420,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<3, 3, T, Q>(
|
return mat<3, 3, T, Q>(
|
||||||
m[0] - scalar,
|
m[0] - scalar,
|
||||||
@ -429,7 +429,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator-(T scalar, mat<3, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator-(T scalar, mat<3, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<3, 3, T, Q>(
|
return mat<3, 3, T, Q>(
|
||||||
scalar - m[0],
|
scalar - m[0],
|
||||||
@ -438,7 +438,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<3, 3, T, Q>(
|
return mat<3, 3, T, Q>(
|
||||||
m1[0] - m2[0],
|
m1[0] - m2[0],
|
||||||
@ -447,7 +447,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<3, 3, T, Q>(
|
return mat<3, 3, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -456,7 +456,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator*(T scalar, mat<3, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator*(T scalar, mat<3, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<3, 3, T, Q>(
|
return mat<3, 3, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -465,7 +465,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<3, 3, T, Q>::col_type operator*(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 3, T, Q>::col_type operator*(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v)
|
||||||
{
|
{
|
||||||
return typename mat<3, 3, T, Q>::col_type(
|
return typename mat<3, 3, T, Q>::col_type(
|
||||||
m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
|
m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,
|
||||||
@ -474,7 +474,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<3, 3, T, Q>::row_type operator*(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 3, T, Q>::row_type operator*(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return typename mat<3, 3, T, Q>::row_type(
|
return typename mat<3, 3, T, Q>::row_type(
|
||||||
m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z,
|
m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z,
|
||||||
@ -483,7 +483,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
T const SrcA00 = m1[0][0];
|
T const SrcA00 = m1[0][0];
|
||||||
T const SrcA01 = m1[0][1];
|
T const SrcA01 = m1[0][1];
|
||||||
@ -519,7 +519,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 3, T, Q>(
|
return mat<2, 3, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
|
||||||
@ -531,7 +531,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<4, 3, T, Q>(
|
return mat<4, 3, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
|
||||||
@ -549,7 +549,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<3, 3, T, Q>(
|
return mat<3, 3, T, Q>(
|
||||||
m[0] / scalar,
|
m[0] / scalar,
|
||||||
@ -558,7 +558,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator/(T scalar, mat<3, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator/(T scalar, mat<3, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<3, 3, T, Q>(
|
return mat<3, 3, T, Q>(
|
||||||
scalar / m[0],
|
scalar / m[0],
|
||||||
@ -567,19 +567,19 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<3, 3, T, Q>::col_type operator/(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 3, T, Q>::col_type operator/(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v)
|
||||||
{
|
{
|
||||||
return inverse(m) * v;
|
return inverse(m) * v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<3, 3, T, Q>::row_type operator/(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 3, T, Q>::row_type operator/(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return v * inverse(m);
|
return v * inverse(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator/(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
mat<3, 3, T, Q> m1_copy(m1);
|
mat<3, 3, T, Q> m1_copy(m1);
|
||||||
return m1_copy /= m2;
|
return m1_copy /= m2;
|
||||||
@ -594,7 +594,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator!=(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
|
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ namespace glm
|
|||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
|
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; }
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i) GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type & operator[](length_type i) GLM_NOEXCEPT;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
||||||
|
|
||||||
// -- Constructors --
|
// -- Constructors --
|
||||||
@ -81,84 +81,84 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> & operator=(mat<3, 4, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator=(mat<3, 4, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> & operator+=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator+=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> & operator+=(mat<3, 4, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator+=(mat<3, 4, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> & operator-=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator-=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> & operator-=(mat<3, 4, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator-=(mat<3, 4, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> & operator*=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator*=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> & operator/=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator/=(U s);
|
||||||
|
|
||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> & operator++();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator++();
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> & operator--();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> & operator--();
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator++(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator++(int);
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator--(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator--(int);
|
||||||
};
|
};
|
||||||
|
|
||||||
// -- Unary operators --
|
// -- Unary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m);
|
||||||
|
|
||||||
// -- Binary operators --
|
// -- Binary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator*(T scalar, mat<3, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator*(T scalar, mat<3, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<3, 4, T, Q>::col_type operator*(mat<3, 4, T, Q> const& m, typename mat<3, 4, T, Q>::row_type const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 4, T, Q>::col_type operator*(mat<3, 4, T, Q> const& m, typename mat<3, 4, T, Q>::row_type const& v);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<3, 4, T, Q>::row_type operator*(typename mat<3, 4, T, Q>::col_type const& v, mat<3, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<3, 4, T, Q>::row_type operator*(typename mat<3, 4, T, Q>::col_type const& v, mat<3, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<2, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<3, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator/(mat<3, 4, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator/(mat<3, 4, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator/(T scalar, mat<3, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator/(T scalar, mat<3, 4, T, Q> const& m);
|
||||||
|
|
||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator==(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator!=(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
|
@ -242,7 +242,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<3, 4, T, Q>::col_type & mat<3, 4, T, Q>::operator[](typename mat<3, 4, T, Q>::length_type i) GLM_NOEXCEPT
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 4, T, Q>::col_type & mat<3, 4, T, Q>::operator[](typename mat<3, 4, T, Q>::length_type i) GLM_NOEXCEPT
|
||||||
{
|
{
|
||||||
assert(i < this->length());
|
assert(i < this->length());
|
||||||
return this->value[i];
|
return this->value[i];
|
||||||
@ -259,7 +259,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator=(mat<3, 4, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator=(mat<3, 4, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] = m[0];
|
this->value[0] = m[0];
|
||||||
this->value[1] = m[1];
|
this->value[1] = m[1];
|
||||||
@ -269,7 +269,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator+=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator+=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] += s;
|
this->value[0] += s;
|
||||||
this->value[1] += s;
|
this->value[1] += s;
|
||||||
@ -279,7 +279,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator+=(mat<3, 4, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator+=(mat<3, 4, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] += m[0];
|
this->value[0] += m[0];
|
||||||
this->value[1] += m[1];
|
this->value[1] += m[1];
|
||||||
@ -289,7 +289,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator-=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator-=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] -= s;
|
this->value[0] -= s;
|
||||||
this->value[1] -= s;
|
this->value[1] -= s;
|
||||||
@ -299,7 +299,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator-=(mat<3, 4, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator-=(mat<3, 4, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] -= m[0];
|
this->value[0] -= m[0];
|
||||||
this->value[1] -= m[1];
|
this->value[1] -= m[1];
|
||||||
@ -309,7 +309,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator*=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator*=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] *= s;
|
this->value[0] *= s;
|
||||||
this->value[1] *= s;
|
this->value[1] *= s;
|
||||||
@ -319,7 +319,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> & mat<3, 4, T, Q>::operator/=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> & mat<3, 4, T, Q>::operator/=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] /= s;
|
this->value[0] /= s;
|
||||||
this->value[1] /= s;
|
this->value[1] /= s;
|
||||||
@ -330,7 +330,7 @@ namespace glm
|
|||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator++()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator++()
|
||||||
{
|
{
|
||||||
++this->value[0];
|
++this->value[0];
|
||||||
++this->value[1];
|
++this->value[1];
|
||||||
@ -339,7 +339,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator--()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator--()
|
||||||
{
|
{
|
||||||
--this->value[0];
|
--this->value[0];
|
||||||
--this->value[1];
|
--this->value[1];
|
||||||
@ -348,7 +348,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> mat<3, 4, T, Q>::operator++(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> mat<3, 4, T, Q>::operator++(int)
|
||||||
{
|
{
|
||||||
mat<3, 4, T, Q> Result(*this);
|
mat<3, 4, T, Q> Result(*this);
|
||||||
++*this;
|
++*this;
|
||||||
@ -356,7 +356,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> mat<3, 4, T, Q>::operator--(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> mat<3, 4, T, Q>::operator--(int)
|
||||||
{
|
{
|
||||||
mat<3, 4, T, Q> Result(*this);
|
mat<3, 4, T, Q> Result(*this);
|
||||||
--*this;
|
--*this;
|
||||||
@ -366,13 +366,13 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<3, 4, T, Q>(
|
return mat<3, 4, T, Q>(
|
||||||
-m[0],
|
-m[0],
|
||||||
@ -383,7 +383,7 @@ namespace glm
|
|||||||
// -- Binary arithmetic operators --
|
// -- Binary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<3, 4, T, Q>(
|
return mat<3, 4, T, Q>(
|
||||||
m[0] + scalar,
|
m[0] + scalar,
|
||||||
@ -392,7 +392,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator+(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<3, 4, T, Q>(
|
return mat<3, 4, T, Q>(
|
||||||
m1[0] + m2[0],
|
m1[0] + m2[0],
|
||||||
@ -401,7 +401,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<3, 4, T, Q>(
|
return mat<3, 4, T, Q>(
|
||||||
m[0] - scalar,
|
m[0] - scalar,
|
||||||
@ -410,7 +410,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator-(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<3, 4, T, Q>(
|
return mat<3, 4, T, Q>(
|
||||||
m1[0] - m2[0],
|
m1[0] - m2[0],
|
||||||
@ -419,7 +419,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<3, 4, T, Q>(
|
return mat<3, 4, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -428,7 +428,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator*(T scalar, mat<3, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator*(T scalar, mat<3, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<3, 4, T, Q>(
|
return mat<3, 4, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -437,7 +437,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<3, 4, T, Q>::col_type operator*
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 4, T, Q>::col_type operator*
|
||||||
(
|
(
|
||||||
mat<3, 4, T, Q> const& m,
|
mat<3, 4, T, Q> const& m,
|
||||||
typename mat<3, 4, T, Q>::row_type const& v
|
typename mat<3, 4, T, Q>::row_type const& v
|
||||||
@ -451,7 +451,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<3, 4, T, Q>::row_type operator*
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 4, T, Q>::row_type operator*
|
||||||
(
|
(
|
||||||
typename mat<3, 4, T, Q>::col_type const& v,
|
typename mat<3, 4, T, Q>::col_type const& v,
|
||||||
mat<3, 4, T, Q> const& m
|
mat<3, 4, T, Q> const& m
|
||||||
@ -464,7 +464,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
const T SrcA00 = m1[0][0];
|
const T SrcA00 = m1[0][0];
|
||||||
const T SrcA01 = m1[0][1];
|
const T SrcA01 = m1[0][1];
|
||||||
@ -513,7 +513,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 4, T, Q>(
|
return mat<2, 4, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
|
||||||
@ -527,7 +527,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<3, 4, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<3, 4, T, Q>(
|
return mat<3, 4, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],
|
||||||
@ -545,7 +545,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator/(mat<3, 4, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator/(mat<3, 4, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<3, 4, T, Q>(
|
return mat<3, 4, T, Q>(
|
||||||
m[0] / scalar,
|
m[0] / scalar,
|
||||||
@ -554,7 +554,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator/(T scalar, mat<3, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator/(T scalar, mat<3, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<3, 4, T, Q>(
|
return mat<3, 4, T, Q>(
|
||||||
scalar / m[0],
|
scalar / m[0],
|
||||||
@ -565,13 +565,13 @@ namespace glm
|
|||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator==(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
|
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator!=(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<3, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
|
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ namespace glm
|
|||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; }
|
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; }
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i) GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type & operator[](length_type i) GLM_NOEXCEPT;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
||||||
|
|
||||||
// -- Constructors --
|
// -- Constructors --
|
||||||
@ -86,84 +86,84 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> & operator=(mat<4, 2, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator=(mat<4, 2, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> & operator+=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator+=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> & operator+=(mat<4, 2, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator+=(mat<4, 2, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> & operator-=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator-=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> & operator-=(mat<4, 2, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator-=(mat<4, 2, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> & operator*=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator*=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> & operator/=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator/=(U s);
|
||||||
|
|
||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> & operator++ ();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator++ ();
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> & operator-- ();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> & operator-- ();
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator++(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator++(int);
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator--(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator--(int);
|
||||||
};
|
};
|
||||||
|
|
||||||
// -- Unary operators --
|
// -- Unary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m);
|
||||||
|
|
||||||
// -- Binary operators --
|
// -- Binary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator*(T scalar, mat<4, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator*(T scalar, mat<4, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<4, 2, T, Q>::col_type operator*(mat<4, 2, T, Q> const& m, typename mat<4, 2, T, Q>::row_type const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 2, T, Q>::col_type operator*(mat<4, 2, T, Q> const& m, typename mat<4, 2, T, Q>::row_type const& v);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<4, 2, T, Q>::row_type operator*(typename mat<4, 2, T, Q>::col_type const& v, mat<4, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 2, T, Q>::row_type operator*(typename mat<4, 2, T, Q>::col_type const& v, mat<4, 2, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator/(mat<4, 2, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator/(mat<4, 2, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 2, T, Q> operator/(T scalar, mat<4, 2, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 2, T, Q> operator/(T scalar, mat<4, 2, T, Q> const& m);
|
||||||
|
|
||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator==(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator!=(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2);
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
|
@ -255,7 +255,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<4, 2, T, Q>::col_type & mat<4, 2, T, Q>::operator[](typename mat<4, 2, T, Q>::length_type i) GLM_NOEXCEPT
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 2, T, Q>::col_type & mat<4, 2, T, Q>::operator[](typename mat<4, 2, T, Q>::length_type i) GLM_NOEXCEPT
|
||||||
{
|
{
|
||||||
assert(i < this->length());
|
assert(i < this->length());
|
||||||
return this->value[i];
|
return this->value[i];
|
||||||
@ -272,7 +272,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q>& mat<4, 2, T, Q>::operator=(mat<4, 2, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q>& mat<4, 2, T, Q>::operator=(mat<4, 2, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] = m[0];
|
this->value[0] = m[0];
|
||||||
this->value[1] = m[1];
|
this->value[1] = m[1];
|
||||||
@ -283,7 +283,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator+=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator+=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] += s;
|
this->value[0] += s;
|
||||||
this->value[1] += s;
|
this->value[1] += s;
|
||||||
@ -294,7 +294,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator+=(mat<4, 2, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator+=(mat<4, 2, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] += m[0];
|
this->value[0] += m[0];
|
||||||
this->value[1] += m[1];
|
this->value[1] += m[1];
|
||||||
@ -305,7 +305,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator-=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator-=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] -= s;
|
this->value[0] -= s;
|
||||||
this->value[1] -= s;
|
this->value[1] -= s;
|
||||||
@ -316,7 +316,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator-=(mat<4, 2, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator-=(mat<4, 2, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] -= m[0];
|
this->value[0] -= m[0];
|
||||||
this->value[1] -= m[1];
|
this->value[1] -= m[1];
|
||||||
@ -327,7 +327,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator*=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator*=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] *= s;
|
this->value[0] *= s;
|
||||||
this->value[1] *= s;
|
this->value[1] *= s;
|
||||||
@ -338,7 +338,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator/=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator/=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] /= s;
|
this->value[0] /= s;
|
||||||
this->value[1] /= s;
|
this->value[1] /= s;
|
||||||
@ -350,7 +350,7 @@ namespace glm
|
|||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator++()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator++()
|
||||||
{
|
{
|
||||||
++this->value[0];
|
++this->value[0];
|
||||||
++this->value[1];
|
++this->value[1];
|
||||||
@ -360,7 +360,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator--()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> & mat<4, 2, T, Q>::operator--()
|
||||||
{
|
{
|
||||||
--this->value[0];
|
--this->value[0];
|
||||||
--this->value[1];
|
--this->value[1];
|
||||||
@ -370,7 +370,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> mat<4, 2, T, Q>::operator++(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> mat<4, 2, T, Q>::operator++(int)
|
||||||
{
|
{
|
||||||
mat<4, 2, T, Q> Result(*this);
|
mat<4, 2, T, Q> Result(*this);
|
||||||
++*this;
|
++*this;
|
||||||
@ -378,7 +378,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> mat<4, 2, T, Q>::operator--(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> mat<4, 2, T, Q>::operator--(int)
|
||||||
{
|
{
|
||||||
mat<4, 2, T, Q> Result(*this);
|
mat<4, 2, T, Q> Result(*this);
|
||||||
--*this;
|
--*this;
|
||||||
@ -388,13 +388,13 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<4, 2, T, Q>(
|
return mat<4, 2, T, Q>(
|
||||||
-m[0],
|
-m[0],
|
||||||
@ -406,7 +406,7 @@ namespace glm
|
|||||||
// -- Binary arithmetic operators --
|
// -- Binary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<4, 2, T, Q>(
|
return mat<4, 2, T, Q>(
|
||||||
m[0] + scalar,
|
m[0] + scalar,
|
||||||
@ -416,7 +416,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator+(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<4, 2, T, Q>(
|
return mat<4, 2, T, Q>(
|
||||||
m1[0] + m2[0],
|
m1[0] + m2[0],
|
||||||
@ -426,7 +426,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<4, 2, T, Q>(
|
return mat<4, 2, T, Q>(
|
||||||
m[0] - scalar,
|
m[0] - scalar,
|
||||||
@ -436,7 +436,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator-(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<4, 2, T, Q>(
|
return mat<4, 2, T, Q>(
|
||||||
m1[0] - m2[0],
|
m1[0] - m2[0],
|
||||||
@ -446,7 +446,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<4, 2, T, Q>(
|
return mat<4, 2, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -456,7 +456,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator*(T scalar, mat<4, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator*(T scalar, mat<4, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<4, 2, T, Q>(
|
return mat<4, 2, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -466,7 +466,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<4, 2, T, Q>::col_type operator*(mat<4, 2, T, Q> const& m, typename mat<4, 2, T, Q>::row_type const& v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 2, T, Q>::col_type operator*(mat<4, 2, T, Q> const& m, typename mat<4, 2, T, Q>::row_type const& v)
|
||||||
{
|
{
|
||||||
return typename mat<4, 2, T, Q>::col_type(
|
return typename mat<4, 2, T, Q>::col_type(
|
||||||
m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w,
|
m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w,
|
||||||
@ -474,7 +474,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<4, 2, T, Q>::row_type operator*(typename mat<4, 2, T, Q>::col_type const& v, mat<4, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 2, T, Q>::row_type operator*(typename mat<4, 2, T, Q>::col_type const& v, mat<4, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return typename mat<4, 2, T, Q>::row_type(
|
return typename mat<4, 2, T, Q>::row_type(
|
||||||
v.x * m[0][0] + v.y * m[0][1],
|
v.x * m[0][0] + v.y * m[0][1],
|
||||||
@ -484,7 +484,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
T const SrcA00 = m1[0][0];
|
T const SrcA00 = m1[0][0];
|
||||||
T const SrcA01 = m1[0][1];
|
T const SrcA01 = m1[0][1];
|
||||||
@ -513,7 +513,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<3, 2, T, Q>(
|
return mat<3, 2, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
|
||||||
@ -525,7 +525,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator*(mat<4, 2, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<4, 2, T, Q>(
|
return mat<4, 2, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
|
||||||
@ -539,7 +539,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator/(mat<4, 2, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator/(mat<4, 2, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<4, 2, T, Q>(
|
return mat<4, 2, T, Q>(
|
||||||
m[0] / scalar,
|
m[0] / scalar,
|
||||||
@ -549,7 +549,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 2, T, Q> operator/(T scalar, mat<4, 2, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 2, T, Q> operator/(T scalar, mat<4, 2, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<4, 2, T, Q>(
|
return mat<4, 2, T, Q>(
|
||||||
scalar / m[0],
|
scalar / m[0],
|
||||||
@ -561,13 +561,13 @@ namespace glm
|
|||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator==(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
|
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator!=(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<4, 2, T, Q> const& m1, mat<4, 2, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
|
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ namespace glm
|
|||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; }
|
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; }
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i) GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type & operator[](length_type i) GLM_NOEXCEPT;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
||||||
|
|
||||||
// -- Constructors --
|
// -- Constructors --
|
||||||
@ -86,84 +86,84 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> & operator=(mat<4, 3, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator=(mat<4, 3, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> & operator+=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator+=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> & operator+=(mat<4, 3, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator+=(mat<4, 3, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> & operator-=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator-=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> & operator-=(mat<4, 3, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator-=(mat<4, 3, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> & operator*=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator*=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> & operator/=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> & operator/=(U s);
|
||||||
|
|
||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q>& operator++();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q>& operator++();
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q>& operator--();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q>& operator--();
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator++(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator++(int);
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator--(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator--(int);
|
||||||
};
|
};
|
||||||
|
|
||||||
// -- Unary operators --
|
// -- Unary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m);
|
||||||
|
|
||||||
// -- Binary operators --
|
// -- Binary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator*(T scalar, mat<4, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator*(T scalar, mat<4, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<4, 3, T, Q>::col_type operator*(mat<4, 3, T, Q> const& m, typename mat<4, 3, T, Q>::row_type const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 3, T, Q>::col_type operator*(mat<4, 3, T, Q> const& m, typename mat<4, 3, T, Q>::row_type const& v);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<4, 3, T, Q>::row_type operator*(typename mat<4, 3, T, Q>::col_type const& v, mat<4, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 3, T, Q>::row_type operator*(typename mat<4, 3, T, Q>::col_type const& v, mat<4, 3, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator/(mat<4, 3, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator/(mat<4, 3, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 3, T, Q> operator/(T scalar, mat<4, 3, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 3, T, Q> operator/(T scalar, mat<4, 3, T, Q> const& m);
|
||||||
|
|
||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator==(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator!=(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2);
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
|
@ -255,7 +255,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<4, 3, T, Q>::col_type & mat<4, 3, T, Q>::operator[](typename mat<4, 3, T, Q>::length_type i) GLM_NOEXCEPT
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 3, T, Q>::col_type & mat<4, 3, T, Q>::operator[](typename mat<4, 3, T, Q>::length_type i) GLM_NOEXCEPT
|
||||||
{
|
{
|
||||||
assert(i < this->length());
|
assert(i < this->length());
|
||||||
return this->value[i];
|
return this->value[i];
|
||||||
@ -272,7 +272,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q>& mat<4, 3, T, Q>::operator=(mat<4, 3, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q>& mat<4, 3, T, Q>::operator=(mat<4, 3, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] = m[0];
|
this->value[0] = m[0];
|
||||||
this->value[1] = m[1];
|
this->value[1] = m[1];
|
||||||
@ -283,7 +283,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator+=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator+=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] += s;
|
this->value[0] += s;
|
||||||
this->value[1] += s;
|
this->value[1] += s;
|
||||||
@ -294,7 +294,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator+=(mat<4, 3, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator+=(mat<4, 3, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] += m[0];
|
this->value[0] += m[0];
|
||||||
this->value[1] += m[1];
|
this->value[1] += m[1];
|
||||||
@ -305,7 +305,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator-=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator-=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] -= s;
|
this->value[0] -= s;
|
||||||
this->value[1] -= s;
|
this->value[1] -= s;
|
||||||
@ -316,7 +316,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator-=(mat<4, 3, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator-=(mat<4, 3, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] -= m[0];
|
this->value[0] -= m[0];
|
||||||
this->value[1] -= m[1];
|
this->value[1] -= m[1];
|
||||||
@ -327,7 +327,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator*=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator*=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] *= s;
|
this->value[0] *= s;
|
||||||
this->value[1] *= s;
|
this->value[1] *= s;
|
||||||
@ -338,7 +338,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator/=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator/=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] /= s;
|
this->value[0] /= s;
|
||||||
this->value[1] /= s;
|
this->value[1] /= s;
|
||||||
@ -350,7 +350,7 @@ namespace glm
|
|||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator++()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator++()
|
||||||
{
|
{
|
||||||
++this->value[0];
|
++this->value[0];
|
||||||
++this->value[1];
|
++this->value[1];
|
||||||
@ -360,7 +360,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator--()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> & mat<4, 3, T, Q>::operator--()
|
||||||
{
|
{
|
||||||
--this->value[0];
|
--this->value[0];
|
||||||
--this->value[1];
|
--this->value[1];
|
||||||
@ -370,7 +370,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> mat<4, 3, T, Q>::operator++(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> mat<4, 3, T, Q>::operator++(int)
|
||||||
{
|
{
|
||||||
mat<4, 3, T, Q> Result(*this);
|
mat<4, 3, T, Q> Result(*this);
|
||||||
++*this;
|
++*this;
|
||||||
@ -378,7 +378,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> mat<4, 3, T, Q>::operator--(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> mat<4, 3, T, Q>::operator--(int)
|
||||||
{
|
{
|
||||||
mat<4, 3, T, Q> Result(*this);
|
mat<4, 3, T, Q> Result(*this);
|
||||||
--*this;
|
--*this;
|
||||||
@ -388,13 +388,13 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<4, 3, T, Q>(
|
return mat<4, 3, T, Q>(
|
||||||
-m[0],
|
-m[0],
|
||||||
@ -406,7 +406,7 @@ namespace glm
|
|||||||
// -- Binary arithmetic operators --
|
// -- Binary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<4, 3, T, Q>(
|
return mat<4, 3, T, Q>(
|
||||||
m[0] + scalar,
|
m[0] + scalar,
|
||||||
@ -416,7 +416,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator+(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<4, 3, T, Q>(
|
return mat<4, 3, T, Q>(
|
||||||
m1[0] + m2[0],
|
m1[0] + m2[0],
|
||||||
@ -426,7 +426,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<4, 3, T, Q>(
|
return mat<4, 3, T, Q>(
|
||||||
m[0] - scalar,
|
m[0] - scalar,
|
||||||
@ -436,7 +436,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator-(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<4, 3, T, Q>(
|
return mat<4, 3, T, Q>(
|
||||||
m1[0] - m2[0],
|
m1[0] - m2[0],
|
||||||
@ -446,7 +446,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<4, 3, T, Q>(
|
return mat<4, 3, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -456,7 +456,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator*(T scalar, mat<4, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator*(T scalar, mat<4, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<4, 3, T, Q>(
|
return mat<4, 3, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -466,7 +466,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<4, 3, T, Q>::col_type operator*
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 3, T, Q>::col_type operator*
|
||||||
(
|
(
|
||||||
mat<4, 3, T, Q> const& m,
|
mat<4, 3, T, Q> const& m,
|
||||||
typename mat<4, 3, T, Q>::row_type const& v)
|
typename mat<4, 3, T, Q>::row_type const& v)
|
||||||
@ -478,7 +478,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<4, 3, T, Q>::row_type operator*
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 3, T, Q>::row_type operator*
|
||||||
(
|
(
|
||||||
typename mat<4, 3, T, Q>::col_type const& v,
|
typename mat<4, 3, T, Q>::col_type const& v,
|
||||||
mat<4, 3, T, Q> const& m)
|
mat<4, 3, T, Q> const& m)
|
||||||
@ -491,7 +491,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 3, T, Q>(
|
return mat<2, 3, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
|
||||||
@ -503,7 +503,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
T const SrcA00 = m1[0][0];
|
T const SrcA00 = m1[0][0];
|
||||||
T const SrcA01 = m1[0][1];
|
T const SrcA01 = m1[0][1];
|
||||||
@ -545,7 +545,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator*(mat<4, 3, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<4, 3, T, Q>(
|
return mat<4, 3, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
|
||||||
@ -563,7 +563,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator/(mat<4, 3, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator/(mat<4, 3, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<4, 3, T, Q>(
|
return mat<4, 3, T, Q>(
|
||||||
m[0] / scalar,
|
m[0] / scalar,
|
||||||
@ -573,7 +573,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 3, T, Q> operator/(T scalar, mat<4, 3, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 3, T, Q> operator/(T scalar, mat<4, 3, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<4, 3, T, Q>(
|
return mat<4, 3, T, Q>(
|
||||||
scalar / m[0],
|
scalar / m[0],
|
||||||
@ -585,13 +585,13 @@ namespace glm
|
|||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator==(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
|
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator!=(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<4, 3, T, Q> const& m1, mat<4, 3, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
|
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ namespace glm
|
|||||||
typedef length_t length_type;
|
typedef length_t length_type;
|
||||||
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;}
|
GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;}
|
||||||
|
|
||||||
GLM_FUNC_DECL col_type & operator[](length_type i) GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type & operator[](length_type i) GLM_NOEXCEPT;
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
GLM_FUNC_DECL GLM_CONSTEXPR col_type const& operator[](length_type i) const GLM_NOEXCEPT;
|
||||||
|
|
||||||
// -- Constructors --
|
// -- Constructors --
|
||||||
@ -85,103 +85,103 @@ namespace glm
|
|||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> & operator=(mat<4, 4, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator=(mat<4, 4, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> & operator+=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator+=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> & operator+=(mat<4, 4, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator+=(mat<4, 4, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> & operator-=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator-=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> & operator-=(mat<4, 4, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator-=(mat<4, 4, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> & operator*=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator*=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> & operator*=(mat<4, 4, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator*=(mat<4, 4, U, Q> const& m);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> & operator/=(U s);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator/=(U s);
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> & operator/=(mat<4, 4, U, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator/=(mat<4, 4, U, Q> const& m);
|
||||||
|
|
||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> & operator++();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator++();
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> & operator--();
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> & operator--();
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator++(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator++(int);
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator--(int);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator--(int);
|
||||||
};
|
};
|
||||||
|
|
||||||
// -- Unary operators --
|
// -- Unary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m);
|
||||||
|
|
||||||
// -- Binary operators --
|
// -- Binary operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator+(T scalar, mat<4, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator+(T scalar, mat<4, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator-(T scalar, mat<4, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator-(T scalar, mat<4, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator*(T scalar, mat<4, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator*(T scalar, mat<4, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<4, 4, T, Q>::col_type operator*(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 4, T, Q>::col_type operator*(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<4, 4, T, Q>::row_type operator*(typename mat<4, 4, T, Q>::col_type const& v, mat<4, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 4, T, Q>::row_type operator*(typename mat<4, 4, T, Q>::col_type const& v, mat<4, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<2, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<2, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<3, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m, T scalar);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m, T scalar);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator/(T scalar, mat<4, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator/(T scalar, mat<4, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<4, 4, T, Q>::col_type operator/(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 4, T, Q>::col_type operator/(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL typename mat<4, 4, T, Q>::row_type operator/(typename mat<4, 4, T, Q>::col_type const& v, mat<4, 4, T, Q> const& m);
|
GLM_FUNC_DECL GLM_CONSTEXPR typename mat<4, 4, T, Q>::row_type operator/(typename mat<4, 4, T, Q>::col_type const& v, mat<4, 4, T, Q> const& m);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||||
|
|
||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator==(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator==(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_DECL bool operator!=(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
GLM_FUNC_DECL GLM_CONSTEXPR bool operator!=(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2);
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
|
@ -286,7 +286,7 @@ namespace glm
|
|||||||
// -- Accesses --
|
// -- Accesses --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<4, 4, T, Q>::col_type & mat<4, 4, T, Q>::operator[](typename mat<4, 4, T, Q>::length_type i) GLM_NOEXCEPT
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 4, T, Q>::col_type & mat<4, 4, T, Q>::operator[](typename mat<4, 4, T, Q>::length_type i) GLM_NOEXCEPT
|
||||||
{
|
{
|
||||||
assert(i < this->length());
|
assert(i < this->length());
|
||||||
return this->value[i];
|
return this->value[i];
|
||||||
@ -303,7 +303,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q>& mat<4, 4, T, Q>::operator=(mat<4, 4, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>& mat<4, 4, T, Q>::operator=(mat<4, 4, U, Q> const& m)
|
||||||
{
|
{
|
||||||
//memcpy could be faster
|
//memcpy could be faster
|
||||||
//memcpy(&this->value, &m.value, 16 * sizeof(valType));
|
//memcpy(&this->value, &m.value, 16 * sizeof(valType));
|
||||||
@ -316,7 +316,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q>& mat<4, 4, T, Q>::operator+=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>& mat<4, 4, T, Q>::operator+=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] += s;
|
this->value[0] += s;
|
||||||
this->value[1] += s;
|
this->value[1] += s;
|
||||||
@ -327,7 +327,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q>& mat<4, 4, T, Q>::operator+=(mat<4, 4, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q>& mat<4, 4, T, Q>::operator+=(mat<4, 4, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] += m[0];
|
this->value[0] += m[0];
|
||||||
this->value[1] += m[1];
|
this->value[1] += m[1];
|
||||||
@ -338,7 +338,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator-=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator-=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] -= s;
|
this->value[0] -= s;
|
||||||
this->value[1] -= s;
|
this->value[1] -= s;
|
||||||
@ -349,7 +349,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator-=(mat<4, 4, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator-=(mat<4, 4, U, Q> const& m)
|
||||||
{
|
{
|
||||||
this->value[0] -= m[0];
|
this->value[0] -= m[0];
|
||||||
this->value[1] -= m[1];
|
this->value[1] -= m[1];
|
||||||
@ -360,7 +360,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator*=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator*=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] *= s;
|
this->value[0] *= s;
|
||||||
this->value[1] *= s;
|
this->value[1] *= s;
|
||||||
@ -371,14 +371,14 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator*=(mat<4, 4, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator*=(mat<4, 4, U, Q> const& m)
|
||||||
{
|
{
|
||||||
return (*this = *this * m);
|
return (*this = *this * m);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator/=(U s)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator/=(U s)
|
||||||
{
|
{
|
||||||
this->value[0] /= s;
|
this->value[0] /= s;
|
||||||
this->value[1] /= s;
|
this->value[1] /= s;
|
||||||
@ -389,7 +389,7 @@ namespace glm
|
|||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
template<typename U>
|
template<typename U>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator/=(mat<4, 4, U, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator/=(mat<4, 4, U, Q> const& m)
|
||||||
{
|
{
|
||||||
return *this *= inverse(m);
|
return *this *= inverse(m);
|
||||||
}
|
}
|
||||||
@ -397,7 +397,7 @@ namespace glm
|
|||||||
// -- Increment and decrement operators --
|
// -- Increment and decrement operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator++()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator++()
|
||||||
{
|
{
|
||||||
++this->value[0];
|
++this->value[0];
|
||||||
++this->value[1];
|
++this->value[1];
|
||||||
@ -407,7 +407,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator--()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> & mat<4, 4, T, Q>::operator--()
|
||||||
{
|
{
|
||||||
--this->value[0];
|
--this->value[0];
|
||||||
--this->value[1];
|
--this->value[1];
|
||||||
@ -417,7 +417,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> mat<4, 4, T, Q>::operator++(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> mat<4, 4, T, Q>::operator++(int)
|
||||||
{
|
{
|
||||||
mat<4, 4, T, Q> Result(*this);
|
mat<4, 4, T, Q> Result(*this);
|
||||||
++*this;
|
++*this;
|
||||||
@ -425,7 +425,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> mat<4, 4, T, Q>::operator--(int)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> mat<4, 4, T, Q>::operator--(int)
|
||||||
{
|
{
|
||||||
mat<4, 4, T, Q> Result(*this);
|
mat<4, 4, T, Q> Result(*this);
|
||||||
--*this;
|
--*this;
|
||||||
@ -435,13 +435,13 @@ namespace glm
|
|||||||
// -- Unary constant operators --
|
// -- Unary constant operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<4, 4, T, Q>(
|
return mat<4, 4, T, Q>(
|
||||||
-m[0],
|
-m[0],
|
||||||
@ -453,7 +453,7 @@ namespace glm
|
|||||||
// -- Binary arithmetic operators --
|
// -- Binary arithmetic operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<4, 4, T, Q>(
|
return mat<4, 4, T, Q>(
|
||||||
m[0] + scalar,
|
m[0] + scalar,
|
||||||
@ -463,7 +463,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator+(T scalar, mat<4, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator+(T scalar, mat<4, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<4, 4, T, Q>(
|
return mat<4, 4, T, Q>(
|
||||||
m[0] + scalar,
|
m[0] + scalar,
|
||||||
@ -473,7 +473,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator+(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<4, 4, T, Q>(
|
return mat<4, 4, T, Q>(
|
||||||
m1[0] + m2[0],
|
m1[0] + m2[0],
|
||||||
@ -483,7 +483,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<4, 4, T, Q>(
|
return mat<4, 4, T, Q>(
|
||||||
m[0] - scalar,
|
m[0] - scalar,
|
||||||
@ -493,7 +493,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator-(T scalar, mat<4, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator-(T scalar, mat<4, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<4, 4, T, Q>(
|
return mat<4, 4, T, Q>(
|
||||||
scalar - m[0],
|
scalar - m[0],
|
||||||
@ -503,7 +503,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator-(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<4, 4, T, Q>(
|
return mat<4, 4, T, Q>(
|
||||||
m1[0] - m2[0],
|
m1[0] - m2[0],
|
||||||
@ -513,7 +513,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<4, 4, T, Q>(
|
return mat<4, 4, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -523,7 +523,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator*(T scalar, mat<4, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator*(T scalar, mat<4, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<4, 4, T, Q>(
|
return mat<4, 4, T, Q>(
|
||||||
m[0] * scalar,
|
m[0] * scalar,
|
||||||
@ -533,7 +533,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<4, 4, T, Q>::col_type operator*
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 4, T, Q>::col_type operator*
|
||||||
(
|
(
|
||||||
mat<4, 4, T, Q> const& m,
|
mat<4, 4, T, Q> const& m,
|
||||||
typename mat<4, 4, T, Q>::row_type const& v
|
typename mat<4, 4, T, Q>::row_type const& v
|
||||||
@ -581,7 +581,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<4, 4, T, Q>::row_type operator*
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 4, T, Q>::row_type operator*
|
||||||
(
|
(
|
||||||
typename mat<4, 4, T, Q>::col_type const& v,
|
typename mat<4, 4, T, Q>::col_type const& v,
|
||||||
mat<4, 4, T, Q> const& m
|
mat<4, 4, T, Q> const& m
|
||||||
@ -595,7 +595,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<2, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<2, 4, T, Q>(
|
return mat<2, 4, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
|
||||||
@ -609,7 +609,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<3, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<3, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return mat<3, 4, T, Q>(
|
return mat<3, 4, T, Q>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],
|
||||||
@ -627,7 +627,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator*(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
typename mat<4, 4, T, Q>::col_type const SrcA0 = m1[0];
|
typename mat<4, 4, T, Q>::col_type const SrcA0 = m1[0];
|
||||||
typename mat<4, 4, T, Q>::col_type const SrcA1 = m1[1];
|
typename mat<4, 4, T, Q>::col_type const SrcA1 = m1[1];
|
||||||
@ -648,7 +648,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m, T scalar)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m, T scalar)
|
||||||
{
|
{
|
||||||
return mat<4, 4, T, Q>(
|
return mat<4, 4, T, Q>(
|
||||||
m[0] / scalar,
|
m[0] / scalar,
|
||||||
@ -658,7 +658,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator/(T scalar, mat<4, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator/(T scalar, mat<4, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return mat<4, 4, T, Q>(
|
return mat<4, 4, T, Q>(
|
||||||
scalar / m[0],
|
scalar / m[0],
|
||||||
@ -668,19 +668,19 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<4, 4, T, Q>::col_type operator/(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 4, T, Q>::col_type operator/(mat<4, 4, T, Q> const& m, typename mat<4, 4, T, Q>::row_type const& v)
|
||||||
{
|
{
|
||||||
return inverse(m) * v;
|
return inverse(m) * v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER typename mat<4, 4, T, Q>::row_type operator/(typename mat<4, 4, T, Q>::col_type const& v, mat<4, 4, T, Q> const& m)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 4, T, Q>::row_type operator/(typename mat<4, 4, T, Q>::col_type const& v, mat<4, 4, T, Q> const& m)
|
||||||
{
|
{
|
||||||
return v * inverse(m);
|
return v * inverse(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR mat<4, 4, T, Q> operator/(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
mat<4, 4, T, Q> m1_copy(m1);
|
mat<4, 4, T, Q> m1_copy(m1);
|
||||||
return m1_copy /= m2;
|
return m1_copy /= m2;
|
||||||
@ -689,13 +689,13 @@ namespace glm
|
|||||||
// -- Boolean operators --
|
// -- Boolean operators --
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator==(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator==(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
|
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
GLM_FUNC_QUALIFIER bool operator!=(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool operator!=(mat<4, 4, T, Q> const& m1, mat<4, 4, T, Q> const& m2)
|
||||||
{
|
{
|
||||||
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
|
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user