mirror of
https://github.com/g-truc/glm.git
synced 2024-11-29 19:34:36 +00:00
Merge pull request #767 from jimvonmoon/extract_euler_angle_fix
Fixed potential narrowing conversion in extractEulerAngleXYZ #767
This commit is contained in:
commit
20b3f4bd42
@ -700,12 +700,12 @@ namespace glm
|
||||
T & t2,
|
||||
T & t3)
|
||||
{
|
||||
float T1 = glm::atan2<T, defaultp>(M[2][1], M[2][2]);
|
||||
float C2 = glm::sqrt(M[0][0]*M[0][0] + M[1][0]*M[1][0]);
|
||||
float T2 = glm::atan2<T, defaultp>(-M[2][0], C2);
|
||||
float S1 = glm::sin(T1);
|
||||
float C1 = glm::cos(T1);
|
||||
float T3 = glm::atan2<T, defaultp>(S1*M[0][2] - C1*M[0][1], C1*M[1][1] - S1*M[1][2 ]);
|
||||
T T1 = glm::atan2<T, defaultp>(M[2][1], M[2][2]);
|
||||
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 S1 = glm::sin(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 ]);
|
||||
t1 = -T1;
|
||||
t2 = -T2;
|
||||
t3 = -T3;
|
||||
|
Loading…
Reference in New Issue
Block a user