Merge pull request #1030 from gottfriedleibniz/patch-types
fix: spurious floats #1030
This commit is contained in:
commit
59ae1dd57a
@ -665,13 +665,13 @@ namespace glm
|
|||||||
mat<3, 3, T, defaultp> Result;
|
mat<3, 3, T, defaultp> Result;
|
||||||
Result[0][0] = c;
|
Result[0][0] = c;
|
||||||
Result[0][1] = s;
|
Result[0][1] = s;
|
||||||
Result[0][2] = 0.0f;
|
Result[0][2] = T(0.0);
|
||||||
Result[1][0] = -s;
|
Result[1][0] = -s;
|
||||||
Result[1][1] = c;
|
Result[1][1] = c;
|
||||||
Result[1][2] = 0.0f;
|
Result[1][2] = T(0.0);
|
||||||
Result[2][0] = 0.0f;
|
Result[2][0] = T(0.0);
|
||||||
Result[2][1] = 0.0f;
|
Result[2][1] = T(0.0);
|
||||||
Result[2][2] = 1.0f;
|
Result[2][2] = T(1.0);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ namespace glm
|
|||||||
template<typename genType>
|
template<typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType fastExp2(genType x)
|
GLM_FUNC_QUALIFIER genType fastExp2(genType x)
|
||||||
{
|
{
|
||||||
return fastExp(0.69314718055994530941723212145818f * x);
|
return fastExp(static_cast<genType>(0.69314718055994530941723212145818) * x);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<length_t L, typename T, qualifier Q>
|
template<length_t L, typename T, qualifier Q>
|
||||||
@ -125,7 +125,7 @@ namespace glm
|
|||||||
template<typename genType>
|
template<typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType fastLog2(genType x)
|
GLM_FUNC_QUALIFIER genType fastLog2(genType x)
|
||||||
{
|
{
|
||||||
return fastLog(x) / 0.69314718055994530941723212145818f;
|
return fastLog(x) / static_cast<genType>(0.69314718055994530941723212145818);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<length_t L, typename T, qualifier Q>
|
template<length_t L, typename T, qualifier Q>
|
||||||
|
@ -108,7 +108,7 @@ namespace glm
|
|||||||
|
|
||||||
genType Perpendicular = cross(dir, edge2);
|
genType Perpendicular = cross(dir, edge2);
|
||||||
|
|
||||||
float det = dot(edge1, Perpendicular);
|
typename genType::value_type det = dot(edge1, Perpendicular);
|
||||||
|
|
||||||
if (det > -Epsilon && det < Epsilon)
|
if (det > -Epsilon && det < Epsilon)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user