1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-02-05 09:20:15 +00:00

optimized inverses

This commit is contained in:
Zeno Rogue
2020-09-16 05:57:05 +02:00
parent cea3da31fc
commit e26f8f5a5b
16 changed files with 138 additions and 85 deletions

View File

@@ -331,9 +331,9 @@ EX void full_rotate_camera(int dir, ld val) {
if(rug::rug_control() && lshiftclick) {
hyperpoint h;
if(nonisotropic) {
transmatrix T2 = eupush( tC0(inverse(View)) );
transmatrix T2 = eupush( tC0(view_inverse(View)) );
transmatrix nlp = View * T2;
auto rV = inverse(nlp) * View;
auto rV = ortho_inverse(nlp) * View;
h = nlp * inverse_exp(shiftless(tC0(rV)));
}
else h = inverse_exp(shiftless(tC0(View)));