1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-22 09:27:40 +00:00

refactored grid, and made it display nicely in 2d3d

This commit is contained in:
Zeno Rogue
2019-05-11 19:43:46 +02:00
parent bb63fcdcda
commit d5dc3f2176
2 changed files with 77 additions and 59 deletions

View File

@@ -332,6 +332,16 @@ bool eqmatrix(transmatrix A, transmatrix B, ld eps) {
return true;
}
#if MAXMDIM >= 4
// in the 3D space, move the point h orthogonally to the (x,y) plane by z units
hyperpoint orthogonal_move(const hyperpoint& h, ld z) {
ld u = 1;
if(h[2]) z += asinh(h[2]), u /= acosh(z);
u *= cosh(z);
return hpxy3(h[0] * u, h[1] * u, sinh(z));
}
#endif
// push alpha units vertically
transmatrix ypush(ld alpha) { return cpush(1, alpha); }