mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Merge pull request #1089 from Zuzu-Typ/patch-2
Removed redundant precision qualifiers #1089
This commit is contained in:
commit
b7140ca2c8
@ -47,12 +47,12 @@ namespace glm
|
|||||||
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<3, T, Q> lerp(const vec<3, T, Q>& x, const vec<3, T, Q>& y, const vec<3, T, Q>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<3, T, Q> lerp(const vec<3, T, Q>& x, const vec<3, T, Q>& y, const vec<3, T, Q>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||||
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<4, T, Q> lerp(const vec<4, T, Q>& x, const vec<4, T, Q>& y, const vec<4, T, Q>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<4, T, Q> lerp(const vec<4, T, Q>& x, const vec<4, T, Q>& y, const vec<4, T, Q>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||||
|
|
||||||
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
template<typename T> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||||
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<2, T, Q> saturate(const vec<2, T, Q>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<2, T, Q> saturate(const vec<2, T, Q>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||||
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<3, T, Q> saturate(const vec<3, T, Q>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<3, T, Q> saturate(const vec<3, T, Q>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||||
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<4, T, Q> saturate(const vec<4, T, Q>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<4, T, Q> saturate(const vec<4, T, Q>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||||
|
|
||||||
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
template<typename T> GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
||||||
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<2, T, Q> atan2(const vec<2, T, Q>& x, const vec<2, T, Q>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<2, T, Q> atan2(const vec<2, T, Q>& x, const vec<2, T, Q>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
||||||
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<3, T, Q> atan2(const vec<3, T, Q>& x, const vec<3, T, Q>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<3, T, Q> atan2(const vec<3, T, Q>& x, const vec<3, T, Q>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
||||||
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<4, T, Q> atan2(const vec<4, T, Q>& x, const vec<4, T, Q>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
template<typename T, qualifier Q> GLM_FUNC_QUALIFIER vec<4, T, Q> atan2(const vec<4, T, Q>& x, const vec<4, T, Q>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
||||||
|
@ -699,12 +699,12 @@ namespace glm
|
|||||||
T & t2,
|
T & t2,
|
||||||
T & t3)
|
T & t3)
|
||||||
{
|
{
|
||||||
T T1 = glm::atan2<T, defaultp>(M[2][1], M[2][2]);
|
T T1 = glm::atan2(M[2][1], M[2][2]);
|
||||||
T C2 = glm::sqrt(M[0][0]*M[0][0] + M[1][0]*M[1][0]);
|
T C2 = glm::sqrt(M[0][0]*M[0][0] + M[1][0]*M[1][0]);
|
||||||
T T2 = glm::atan2<T, defaultp>(-M[2][0], C2);
|
T T2 = glm::atan2(-M[2][0], C2);
|
||||||
T S1 = glm::sin(T1);
|
T S1 = glm::sin(T1);
|
||||||
T C1 = glm::cos(T1);
|
T C1 = glm::cos(T1);
|
||||||
T T3 = glm::atan2<T, defaultp>(S1*M[0][2] - C1*M[0][1], C1*M[1][1] - S1*M[1][2 ]);
|
T T3 = glm::atan2(S1*M[0][2] - C1*M[0][1], C1*M[1][1] - S1*M[1][2 ]);
|
||||||
t1 = -T1;
|
t1 = -T1;
|
||||||
t2 = -T2;
|
t2 = -T2;
|
||||||
t3 = -T3;
|
t3 = -T3;
|
||||||
@ -716,12 +716,12 @@ namespace glm
|
|||||||
T & t2,
|
T & t2,
|
||||||
T & t3)
|
T & t3)
|
||||||
{
|
{
|
||||||
T T1 = glm::atan2<T, defaultp>(M[2][0], M[2][2]);
|
T T1 = glm::atan2(M[2][0], M[2][2]);
|
||||||
T C2 = glm::sqrt(M[0][1]*M[0][1] + M[1][1]*M[1][1]);
|
T C2 = glm::sqrt(M[0][1]*M[0][1] + M[1][1]*M[1][1]);
|
||||||
T T2 = glm::atan2<T, defaultp>(-M[2][1], C2);
|
T T2 = glm::atan2(-M[2][1], C2);
|
||||||
T S1 = glm::sin(T1);
|
T S1 = glm::sin(T1);
|
||||||
T C1 = glm::cos(T1);
|
T C1 = glm::cos(T1);
|
||||||
T T3 = glm::atan2<T, defaultp>(S1*M[1][2] - C1*M[1][0], C1*M[0][0] - S1*M[0][2]);
|
T T3 = glm::atan2(S1*M[1][2] - C1*M[1][0], C1*M[0][0] - S1*M[0][2]);
|
||||||
t1 = T1;
|
t1 = T1;
|
||||||
t2 = T2;
|
t2 = T2;
|
||||||
t3 = T3;
|
t3 = T3;
|
||||||
@ -733,12 +733,12 @@ namespace glm
|
|||||||
T & t2,
|
T & t2,
|
||||||
T & t3)
|
T & t3)
|
||||||
{
|
{
|
||||||
T T1 = glm::atan2<T, defaultp>(M[0][2], M[0][1]);
|
T T1 = glm::atan2(M[0][2], M[0][1]);
|
||||||
T S2 = glm::sqrt(M[1][0]*M[1][0] + M[2][0]*M[2][0]);
|
T S2 = glm::sqrt(M[1][0]*M[1][0] + M[2][0]*M[2][0]);
|
||||||
T T2 = glm::atan2<T, defaultp>(S2, M[0][0]);
|
T T2 = glm::atan2(S2, M[0][0]);
|
||||||
T S1 = glm::sin(T1);
|
T S1 = glm::sin(T1);
|
||||||
T C1 = glm::cos(T1);
|
T C1 = glm::cos(T1);
|
||||||
T T3 = glm::atan2<T, defaultp>(C1*M[1][2] - S1*M[1][1], C1*M[2][2] - S1*M[2][1]);
|
T T3 = glm::atan2(C1*M[1][2] - S1*M[1][1], C1*M[2][2] - S1*M[2][1]);
|
||||||
t1 = T1;
|
t1 = T1;
|
||||||
t2 = T2;
|
t2 = T2;
|
||||||
t3 = T3;
|
t3 = T3;
|
||||||
@ -750,12 +750,12 @@ namespace glm
|
|||||||
T & t2,
|
T & t2,
|
||||||
T & t3)
|
T & t3)
|
||||||
{
|
{
|
||||||
T T1 = glm::atan2<T, defaultp>(M[0][1], -M[0][2]);
|
T T1 = glm::atan2(M[0][1], -M[0][2]);
|
||||||
T S2 = glm::sqrt(M[1][0]*M[1][0] + M[2][0]*M[2][0]);
|
T S2 = glm::sqrt(M[1][0]*M[1][0] + M[2][0]*M[2][0]);
|
||||||
T T2 = glm::atan2<T, defaultp>(S2, M[0][0]);
|
T T2 = glm::atan2(S2, M[0][0]);
|
||||||
T S1 = glm::sin(T1);
|
T S1 = glm::sin(T1);
|
||||||
T C1 = glm::cos(T1);
|
T C1 = glm::cos(T1);
|
||||||
T T3 = glm::atan2<T, defaultp>(-C1*M[2][1] - S1*M[2][2], C1*M[1][1] + S1*M[1][2]);
|
T T3 = glm::atan2(-C1*M[2][1] - S1*M[2][2], C1*M[1][1] + S1*M[1][2]);
|
||||||
t1 = T1;
|
t1 = T1;
|
||||||
t2 = T2;
|
t2 = T2;
|
||||||
t3 = T3;
|
t3 = T3;
|
||||||
@ -767,12 +767,12 @@ namespace glm
|
|||||||
T & t2,
|
T & t2,
|
||||||
T & t3)
|
T & t3)
|
||||||
{
|
{
|
||||||
T T1 = glm::atan2<T, defaultp>(M[1][0], M[1][2]);
|
T T1 = glm::atan2(M[1][0], M[1][2]);
|
||||||
T S2 = glm::sqrt(M[0][1]*M[0][1] + M[2][1]*M[2][1]);
|
T S2 = glm::sqrt(M[0][1]*M[0][1] + M[2][1]*M[2][1]);
|
||||||
T T2 = glm::atan2<T, defaultp>(S2, M[1][1]);
|
T T2 = glm::atan2(S2, M[1][1]);
|
||||||
T S1 = glm::sin(T1);
|
T S1 = glm::sin(T1);
|
||||||
T C1 = glm::cos(T1);
|
T C1 = glm::cos(T1);
|
||||||
T T3 = glm::atan2<T, defaultp>(C1*M[2][0] - S1*M[2][2], C1*M[0][0] - S1*M[0][2]);
|
T T3 = glm::atan2(C1*M[2][0] - S1*M[2][2], C1*M[0][0] - S1*M[0][2]);
|
||||||
t1 = T1;
|
t1 = T1;
|
||||||
t2 = T2;
|
t2 = T2;
|
||||||
t3 = T3;
|
t3 = T3;
|
||||||
@ -784,12 +784,12 @@ namespace glm
|
|||||||
T & t2,
|
T & t2,
|
||||||
T & t3)
|
T & t3)
|
||||||
{
|
{
|
||||||
T T1 = glm::atan2<T, defaultp>(M[1][2], -M[1][0]);
|
T T1 = glm::atan2(M[1][2], -M[1][0]);
|
||||||
T S2 = glm::sqrt(M[0][1]*M[0][1] + M[2][1]*M[2][1]);
|
T S2 = glm::sqrt(M[0][1]*M[0][1] + M[2][1]*M[2][1]);
|
||||||
T T2 = glm::atan2<T, defaultp>(S2, M[1][1]);
|
T T2 = glm::atan2(S2, M[1][1]);
|
||||||
T S1 = glm::sin(T1);
|
T S1 = glm::sin(T1);
|
||||||
T C1 = glm::cos(T1);
|
T C1 = glm::cos(T1);
|
||||||
T T3 = glm::atan2<T, defaultp>(-S1*M[0][0] - C1*M[0][2], S1*M[2][0] + C1*M[2][2]);
|
T T3 = glm::atan2(-S1*M[0][0] - C1*M[0][2], S1*M[2][0] + C1*M[2][2]);
|
||||||
t1 = T1;
|
t1 = T1;
|
||||||
t2 = T2;
|
t2 = T2;
|
||||||
t3 = T3;
|
t3 = T3;
|
||||||
@ -801,12 +801,12 @@ namespace glm
|
|||||||
T & t2,
|
T & t2,
|
||||||
T & t3)
|
T & t3)
|
||||||
{
|
{
|
||||||
T T1 = glm::atan2<T, defaultp>(M[2][1], M[2][0]);
|
T T1 = glm::atan2(M[2][1], M[2][0]);
|
||||||
T S2 = glm::sqrt(M[0][2]*M[0][2] + M[1][2]*M[1][2]);
|
T S2 = glm::sqrt(M[0][2]*M[0][2] + M[1][2]*M[1][2]);
|
||||||
T T2 = glm::atan2<T, defaultp>(S2, M[2][2]);
|
T T2 = glm::atan2(S2, M[2][2]);
|
||||||
T S1 = glm::sin(T1);
|
T S1 = glm::sin(T1);
|
||||||
T C1 = glm::cos(T1);
|
T C1 = glm::cos(T1);
|
||||||
T T3 = glm::atan2<T, defaultp>(C1*M[0][1] - S1*M[0][0], C1*M[1][1] - S1*M[1][0]);
|
T T3 = glm::atan2(C1*M[0][1] - S1*M[0][0], C1*M[1][1] - S1*M[1][0]);
|
||||||
t1 = T1;
|
t1 = T1;
|
||||||
t2 = T2;
|
t2 = T2;
|
||||||
t3 = T3;
|
t3 = T3;
|
||||||
@ -818,12 +818,12 @@ namespace glm
|
|||||||
T & t2,
|
T & t2,
|
||||||
T & t3)
|
T & t3)
|
||||||
{
|
{
|
||||||
T T1 = glm::atan2<T, defaultp>(M[2][0], -M[2][1]);
|
T T1 = glm::atan2(M[2][0], -M[2][1]);
|
||||||
T S2 = glm::sqrt(M[0][2]*M[0][2] + M[1][2]*M[1][2]);
|
T S2 = glm::sqrt(M[0][2]*M[0][2] + M[1][2]*M[1][2]);
|
||||||
T T2 = glm::atan2<T, defaultp>(S2, M[2][2]);
|
T T2 = glm::atan2(S2, M[2][2]);
|
||||||
T S1 = glm::sin(T1);
|
T S1 = glm::sin(T1);
|
||||||
T C1 = glm::cos(T1);
|
T C1 = glm::cos(T1);
|
||||||
T T3 = glm::atan2<T, defaultp>(-C1*M[1][0] - S1*M[1][1], C1*M[0][0] + S1*M[0][1]);
|
T T3 = glm::atan2(-C1*M[1][0] - S1*M[1][1], C1*M[0][0] + S1*M[0][1]);
|
||||||
t1 = T1;
|
t1 = T1;
|
||||||
t2 = T2;
|
t2 = T2;
|
||||||
t3 = T3;
|
t3 = T3;
|
||||||
@ -835,12 +835,12 @@ namespace glm
|
|||||||
T & t2,
|
T & t2,
|
||||||
T & t3)
|
T & t3)
|
||||||
{
|
{
|
||||||
T T1 = glm::atan2<T, defaultp>(M[1][2], M[1][1]);
|
T T1 = glm::atan2(M[1][2], M[1][1]);
|
||||||
T C2 = glm::sqrt(M[0][0]*M[0][0] + M[2][0]*M[2][0]);
|
T C2 = glm::sqrt(M[0][0]*M[0][0] + M[2][0]*M[2][0]);
|
||||||
T T2 = glm::atan2<T, defaultp>(-M[1][0], C2);
|
T T2 = glm::atan2(-M[1][0], C2);
|
||||||
T S1 = glm::sin(T1);
|
T S1 = glm::sin(T1);
|
||||||
T C1 = glm::cos(T1);
|
T C1 = glm::cos(T1);
|
||||||
T T3 = glm::atan2<T, defaultp>(S1*M[0][1] - C1*M[0][2], C1*M[2][2] - S1*M[2][1]);
|
T T3 = glm::atan2(S1*M[0][1] - C1*M[0][2], C1*M[2][2] - S1*M[2][1]);
|
||||||
t1 = T1;
|
t1 = T1;
|
||||||
t2 = T2;
|
t2 = T2;
|
||||||
t3 = T3;
|
t3 = T3;
|
||||||
@ -852,12 +852,12 @@ namespace glm
|
|||||||
T & t2,
|
T & t2,
|
||||||
T & t3)
|
T & t3)
|
||||||
{
|
{
|
||||||
T T1 = glm::atan2<T, defaultp>(-M[0][2], M[0][0]);
|
T T1 = glm::atan2(-M[0][2], M[0][0]);
|
||||||
T C2 = glm::sqrt(M[1][1]*M[1][1] + M[2][1]*M[2][1]);
|
T C2 = glm::sqrt(M[1][1]*M[1][1] + M[2][1]*M[2][1]);
|
||||||
T T2 = glm::atan2<T, defaultp>(M[0][1], C2);
|
T T2 = glm::atan2(M[0][1], C2);
|
||||||
T S1 = glm::sin(T1);
|
T S1 = glm::sin(T1);
|
||||||
T C1 = glm::cos(T1);
|
T C1 = glm::cos(T1);
|
||||||
T T3 = glm::atan2<T, defaultp>(S1*M[1][0] + C1*M[1][2], S1*M[2][0] + C1*M[2][2]);
|
T T3 = glm::atan2(S1*M[1][0] + C1*M[1][2], S1*M[2][0] + C1*M[2][2]);
|
||||||
t1 = T1;
|
t1 = T1;
|
||||||
t2 = T2;
|
t2 = T2;
|
||||||
t3 = T3;
|
t3 = T3;
|
||||||
@ -869,12 +869,12 @@ namespace glm
|
|||||||
T & t2,
|
T & t2,
|
||||||
T & t3)
|
T & t3)
|
||||||
{
|
{
|
||||||
T T1 = glm::atan2<T, defaultp>(M[0][1], M[0][0]);
|
T T1 = glm::atan2(M[0][1], M[0][0]);
|
||||||
T C2 = glm::sqrt(M[1][2]*M[1][2] + M[2][2]*M[2][2]);
|
T C2 = glm::sqrt(M[1][2]*M[1][2] + M[2][2]*M[2][2]);
|
||||||
T T2 = glm::atan2<T, defaultp>(-M[0][2], C2);
|
T T2 = glm::atan2(-M[0][2], C2);
|
||||||
T S1 = glm::sin(T1);
|
T S1 = glm::sin(T1);
|
||||||
T C1 = glm::cos(T1);
|
T C1 = glm::cos(T1);
|
||||||
T T3 = glm::atan2<T, defaultp>(S1*M[2][0] - C1*M[2][1], C1*M[1][1] - S1*M[1][0]);
|
T T3 = glm::atan2(S1*M[2][0] - C1*M[2][1], C1*M[1][1] - S1*M[1][0]);
|
||||||
t1 = T1;
|
t1 = T1;
|
||||||
t2 = T2;
|
t2 = T2;
|
||||||
t3 = T3;
|
t3 = T3;
|
||||||
@ -886,12 +886,12 @@ namespace glm
|
|||||||
T & t2,
|
T & t2,
|
||||||
T & t3)
|
T & t3)
|
||||||
{
|
{
|
||||||
T T1 = glm::atan2<T, defaultp>(-M[1][0], M[1][1]);
|
T T1 = glm::atan2(-M[1][0], M[1][1]);
|
||||||
T C2 = glm::sqrt(M[0][2]*M[0][2] + M[2][2]*M[2][2]);
|
T C2 = glm::sqrt(M[0][2]*M[0][2] + M[2][2]*M[2][2]);
|
||||||
T T2 = glm::atan2<T, defaultp>(M[1][2], C2);
|
T T2 = glm::atan2(M[1][2], C2);
|
||||||
T S1 = glm::sin(T1);
|
T S1 = glm::sin(T1);
|
||||||
T C1 = glm::cos(T1);
|
T C1 = glm::cos(T1);
|
||||||
T T3 = glm::atan2<T, defaultp>(C1*M[2][0] + S1*M[2][1], C1*M[0][0] + S1*M[0][1]);
|
T T3 = glm::atan2(C1*M[2][0] + S1*M[2][1], C1*M[0][0] + S1*M[0][1]);
|
||||||
t1 = T1;
|
t1 = T1;
|
||||||
t2 = T2;
|
t2 = T2;
|
||||||
t3 = T3;
|
t3 = T3;
|
||||||
|
Loading…
Reference in New Issue
Block a user