Merge pull request #1030 from gottfriedleibniz/patch-types

fix: spurious floats #1030
master
Christophe ago%!(EXTRA string=5 years) committed by GitHub
commit 59ae1dd57a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      glm/gtx/euler_angles.inl
  2. 4
      glm/gtx/fast_exponential.inl
  3. 2
      glm/gtx/intersect.inl

@ -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;
}

@ -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>

@ -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;

Loading…
Cancel
Save