1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-28 04:17:39 +00:00

used cyclefix and raddif in more places; (c)spin90, (c)spin180 and spin180 functions; rephrased M_PI in terms of TAU and x._deg when applicable

This commit is contained in:
Zeno Rogue
2022-11-12 22:38:45 +01:00
parent 563b9c1f74
commit 06523e063e
100 changed files with 750 additions and 757 deletions

View File

@@ -98,10 +98,10 @@ void draw_texture(texture_to_use& tu) {
int pts_id = 0;
auto add = [&] (int x, int y) {
ld x0 = (y-(YSCALE/2.)) / YSCALE * M_PI * 4;
ld x0 = (y-(YSCALE/2.)) / YSCALE * 720._deg;
ld mercator_y0 = (x-(XSCALE/2.)) / (XSCALE/2.) * M_PI * MWIDTH;
ld y0 = asin(tanh(2 * mercator_y0));
ld y1 = y0 - 90 * degree;
ld y1 = y0 - 90._deg;
et.tinf.tvertices.push_back(glhr::makevertex(x * 1. / XSCALE, .5 + (y-0.5) / MWIDTH / YSCALE, 0));
@@ -111,7 +111,7 @@ void draw_texture(texture_to_use& tu) {
ld s = current.shift - tu.ctr;
// We actually want to compute this, but this is not precise enough:
// cr = ds_cross0(current.T * lorentz(2, 3, -current.shift) * cspin(0, 1, x0) * cspin(0, 2, y0 - 90*degree));
// cr = ds_cross0(current.T * lorentz(2, 3, -current.shift) * cspin(0, 1, x0) * cspin(0, 2, y0 - 90._deg));
// Here is what we get for current.T == Id: (computed with sympy)
hyperpoint now;