1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-01-14 11:15:48 +00:00

fix_rotation compactized

This commit is contained in:
Zeno Rogue 2023-02-04 19:41:10 +01:00
parent 2fe39a6613
commit 334c4715af

View File

@ -1006,8 +1006,7 @@ EX void orthonormalize(transmatrix& T) {
EX void fix_rotation(transmatrix& rot) { EX void fix_rotation(transmatrix& rot) {
dynamicval<eGeometry> g(geometry, gSphere); dynamicval<eGeometry> g(geometry, gSphere);
fixmatrix(rot); fixmatrix(rot);
for(int i=0; i<3; i++) rot[i][3] = rot[3][i] = 0; fix4(rot);
rot[3][3] = 1;
} }
/** determinant 2x2 */ /** determinant 2x2 */