mirror of
https://github.com/g-truc/glm.git
synced 2024-11-29 11:24:35 +00:00
compilation fixes
Signed-off-by: Sergey Krivohatskiy <s.krivohatskiy@gmail.com>
This commit is contained in:
parent
2010c883d5
commit
e81a9c4baa
@ -38,19 +38,19 @@ static int test_axisAngle()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
int testForAxisAngle(glm::tvec3<T> const axisTrue, T const angleTrue)
|
int testForAxisAngle(glm::vec<3, T, glm::defaultp> const axisTrue, T const angleTrue)
|
||||||
{
|
{
|
||||||
T const eps = sqrt(std::numeric_limits<T>::epsilon());
|
T const eps = sqrt(std::numeric_limits<T>::epsilon());
|
||||||
|
|
||||||
glm::tmat4x4<T> const matTrue = glm::axisAngleMatrix(axisTrue, angleTrue);
|
glm::mat<4, 4, T, glm::defaultp> const matTrue = glm::axisAngleMatrix(axisTrue, angleTrue);
|
||||||
|
|
||||||
glm::tvec3<T> axis;
|
glm::vec<3, T, glm::defaultp> axis;
|
||||||
T angle;
|
T angle;
|
||||||
glm::axisAngle(matTrue, axis, angle);
|
glm::axisAngle(matTrue, axis, angle);
|
||||||
glm::tmat4x4<T> const matRebuilt = glm::axisAngleMatrix(axis, angle);
|
glm::mat<4, 4, T, glm::defaultp> const matRebuilt = glm::axisAngleMatrix(axis, angle);
|
||||||
|
|
||||||
glm::tmat4x4<T> const errMat = matTrue - matRebuilt;
|
glm::mat<4, 4, T, glm::defaultp> const errMat = matTrue - matRebuilt;
|
||||||
T const maxErr = glm::compMax(glm::tvec4<T>(
|
T const maxErr = glm::compMax(glm::vec<4, T, glm::defaultp>(
|
||||||
glm::compMax(glm::abs(errMat[0])),
|
glm::compMax(glm::abs(errMat[0])),
|
||||||
glm::compMax(glm::abs(errMat[1])),
|
glm::compMax(glm::abs(errMat[1])),
|
||||||
glm::compMax(glm::abs(errMat[2])),
|
glm::compMax(glm::abs(errMat[2])),
|
||||||
|
Loading…
Reference in New Issue
Block a user