1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-17 03:28:05 +00:00

findbaseAround for all binary tilings

This commit is contained in:
Zeno Rogue
2019-03-17 04:08:17 +01:00
parent 608692b6df
commit 378d21b509
2 changed files with 32 additions and 15 deletions

View File

@@ -525,6 +525,16 @@ namespace binary {
ld co = vid.binary_width / log(2) / 4;
return hr::parabolic13(y * co, z * co);
}
// on which horocycle are we
ld horo_level(hyperpoint h) {
using namespace hyperpoint_vec;
h /= (1 + h[DIM]);
h[0] -= 1;
h /= sqhypot_d(DIM, h);
h[0] += .5;
return log(2) + log(-h[0]);
}
hyperpoint deparabolic3(hyperpoint h) {
using namespace hyperpoint_vec;