1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-31 05:52:59 +00:00

simplified the scaling scode

This commit is contained in:
Zeno Rogue
2018-08-28 19:05:57 +02:00
parent 6d5d8d8134
commit 015e69cf30
6 changed files with 386 additions and 431 deletions

View File

@@ -2,7 +2,6 @@ namespace hr { namespace gp {
loc param(1, 0);
hyperpoint next;
ld scale;
ld alpha;
int area;
@@ -582,9 +581,11 @@ namespace hr { namespace gp {
int y = param.second;
area = ((2*x+y) * (2*x+y) + y*y*3) / 4;
next = hpxyz(x+y/2., -y * sqrt(3) / 2, 0);
scale = 1 / hypot2(next);
ld scale = 1 / hypot2(next);
crossf *= scale;
hepvdist *= scale;
hexhexdist *= scale;
hexvdist *= scale;
rhexf *= scale;
// spin = spintox(next);
// ispin = rspintox(next);
@@ -600,7 +601,6 @@ namespace hr { namespace gp {
Xprintf("scale = " LDF "\n", scale);
}
else {
scale = 1;
alpha = 0;
}
}