1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-07 09:13:02 +00:00

fixed problems with Euclidean [move before]

This commit is contained in:
Zeno Rogue
2019-05-15 09:34:40 +02:00
parent e5d6278ab1
commit 79de14b649
3 changed files with 21 additions and 18 deletions

View File

@@ -1156,7 +1156,7 @@ namespace euclid3 {
#endif
ld matrixnorm(const transmatrix& Mat) {
return Mat[0][2] * Mat[0][2] + Mat[1][2] * Mat[1][2];
return Mat[0][DIM] * Mat[0][DIM] + Mat[1][DIM] * Mat[1][DIM] + Mat[2][DIM] * Mat[2][DIM];
}
void hrmap_euclid_any::draw() {
@@ -1175,7 +1175,7 @@ void hrmap_euclid_any::draw() {
vector<euspot> dfs = {zero};
ld centerd = matrixnorm(View);
auto View0 = View;
auto View0 = cview();
for(int i=0; i<isize(dfs); i++) {
int dx, dy;
@@ -1189,7 +1189,7 @@ void hrmap_euclid_any::draw() {
if(true) {
ld locald = matrixnorm(Mat);
if(locald < centerd) centerd = locald, centerover = cw, View = Mat;
if(locald < centerd) centerd = locald, centerover = cw, View = inverse(actual_view_transform) * Mat;
}
if(do_draw(cw.at, Mat)) {