Merge pull request #1030 from gottfriedleibniz/patch-types

fix: spurious floats #1030
This commit is contained in:
Christophe 2020-11-09 17:53:59 +01:00 committed by GitHub
commit 59ae1dd57a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

@ -665,13 +665,13 @@ namespace glm
mat<3, 3, T, defaultp> Result;
Result[0][0] = c;
Result[0][1] = s;
Result[0][2] = 0.0f;
Result[0][2] = T(0.0);
Result[1][0] = -s;
Result[1][1] = c;
Result[1][2] = 0.0f;
Result[2][0] = 0.0f;
Result[2][1] = 0.0f;
Result[2][2] = 1.0f;
Result[1][2] = T(0.0);
Result[2][0] = T(0.0);
Result[2][1] = T(0.0);
Result[2][2] = T(1.0);
return Result;
}

View file

@ -112,7 +112,7 @@ namespace glm
template<typename genType>
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>
@ -125,7 +125,7 @@ namespace glm
template<typename genType>
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>

View file

@ -108,7 +108,7 @@ namespace glm
genType Perpendicular = cross(dir, edge2);
float det = dot(edge1, Perpendicular);
typename genType::value_type det = dot(edge1, Perpendicular);
if (det > -Epsilon && det < Epsilon)
return false;