1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-14 01:16:50 +00:00

removed eurad as it was the same as crossf

This commit is contained in:
Zeno Rogue 2019-04-29 11:18:10 +02:00
parent cb164d92c2
commit c98f58a672
3 changed files with 13 additions and 15 deletions

View File

@ -354,8 +354,8 @@ void virtualRebaseSimple(heptagon*& base, transmatrix& at) {
double cellgfxdist(cell *c, int i) {
if(euclid) {
if(c->type == 8 && (i&1)) return eurad * sqrt(2);
return eurad;
if(c->type == 8 && (i&1)) return crossf * sqrt(2);
return crossf;
}
if(NONSTDVAR || archimedean) return hdist0(tC0(calc_relative_matrix(c->move(i), c, i)));
return !BITRUNCATED ? tessf : (c->type == 6 && (i&1)) ? hexhexdist : crossf;

View File

@ -146,8 +146,6 @@ void addMessage(string s, char spamtype = 0);
#define S6 (S3*2)
#define MAX_S3 4
#define eurad crossf
#define SG6 (S3==3?6:4)
#define SG3 (S3==3?3:2)
#define SG2 (S3==3?2:1)

View File

@ -669,7 +669,7 @@ double q3 = sqrt(double(3));
bool outofmap(hyperpoint h) {
if(euclid)
return h[2] < .5; // false; // h[0] * h[0] + h[1] * h[1] > 15 * eurad;
return h[2] < .5; // false; // h[0] * h[0] + h[1] * h[1] > 15 * crossf;
else if(sphere)
return h[2] < .1 && h[2] > -.1 && h[1] > -.1 && h[1] < .1 && h[0] > -.1 && h[0] < .1;
else
@ -1010,22 +1010,22 @@ transmatrix eumove(ld x, ld y) {
Mat[2][2] = 1;
if(a4) {
Mat[0][2] += x * eurad;
Mat[1][2] += y * eurad;
Mat[0][2] += x * crossf;
Mat[1][2] += y * crossf;
}
else {
Mat[0][2] += (x + y * .5) * eurad;
// Mat[2][0] += (x + y * .5) * eurad;
Mat[1][2] += y * q3 /2 * eurad;
// Mat[2][1] += y * q3 /2 * eurad;
Mat[0][2] += (x + y * .5) * crossf;
// Mat[2][0] += (x + y * .5) * crossf;
Mat[1][2] += y * q3 /2 * crossf;
// Mat[2][1] += y * q3 /2 * crossf;
}
ld v = a4 ? 1 : q3;
while(Mat[0][2] <= -16384 * eurad) Mat[0][2] += 32768 * eurad;
while(Mat[0][2] >= 16384 * eurad) Mat[0][2] -= 32768 * eurad;
while(Mat[1][2] <= -16384 * v * eurad) Mat[1][2] += 32768 * v * eurad;
while(Mat[1][2] >= 16384 * v * eurad) Mat[1][2] -= 32768 * v * eurad;
while(Mat[0][2] <= -16384 * crossf) Mat[0][2] += 32768 * crossf;
while(Mat[0][2] >= 16384 * crossf) Mat[0][2] -= 32768 * crossf;
while(Mat[1][2] <= -16384 * v * crossf) Mat[1][2] += 32768 * v * crossf;
while(Mat[1][2] >= 16384 * v * crossf) Mat[1][2] -= 32768 * v * crossf;
return Mat;
}