mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 13:07:16 +00:00
cleanup
This commit is contained in:
parent
8d3173d1a4
commit
1dfe67de86
@ -2281,25 +2281,30 @@ EX namespace rots {
|
||||
|
||||
M[0][0] = +xx - yy - zz + ww;
|
||||
M[1][1] = -xx + yy - zz + ww;
|
||||
M[2][2] = -xx - yy + zz + ww;
|
||||
|
||||
M[0][1] = -2 * (xy + zw);
|
||||
M[1][0] = -2 * (xy - zw);
|
||||
|
||||
M[0][2] = 2 * (xz - yw);
|
||||
M[2][0] = 2 * (xz + yw);
|
||||
|
||||
M[1][2] = -2 * (yz + xw);
|
||||
M[2][1] = -2 * (yz - xw);
|
||||
|
||||
if(hyperbolic) {
|
||||
swap(M[0][2], M[1][2]);
|
||||
swap(M[2][0], M[2][1]);
|
||||
M[1][2] *= -1;
|
||||
M[2][0] *= -1;
|
||||
M[2][2] = xx + yy + zz + ww;
|
||||
return M;
|
||||
}
|
||||
|
||||
M[0][1] = -2 * (xy + zw);
|
||||
M[1][0] = -2 * (xy - zw);
|
||||
|
||||
M[0][2] = -2 * (yz + xw);
|
||||
M[2][0] = 2 * (yz - xw);
|
||||
|
||||
M[1][2] = -2 * (xz - yw);
|
||||
M[2][1] = 2 * (xz + yw);
|
||||
} else {
|
||||
M[2][2] = -xx - yy + zz + ww;
|
||||
|
||||
M[0][1] = -2 * (xy + zw);
|
||||
M[1][0] = -2 * (xy - zw);
|
||||
|
||||
M[0][2] = 2 * (xz - yw);
|
||||
M[2][0] = 2 * (xz + yw);
|
||||
|
||||
M[1][2] = -2 * (yz + xw);
|
||||
M[2][1] = -2 * (yz - xw);
|
||||
}
|
||||
|
||||
|
||||
return M;
|
||||
|
Loading…
Reference in New Issue
Block a user