1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-16 19:18:05 +00:00

updir and expansion functions in binarytiling

This commit is contained in:
Zeno Rogue
2019-07-25 23:06:09 +02:00
parent 0908d1d974
commit b2e8a869cb
3 changed files with 24 additions and 4 deletions

View File

@@ -478,6 +478,24 @@ namespace binary {
return (use_direct >> dir) & 1;
}
ld expansion() {
switch(geometry) {
case gHoroRec:
return sqrt(2);
case gHoroHex:
return sqrt(3);
case gKiteDart3:
return (sqrt(5)+1)/2;
default:
return 2;
}
}
int updir() {
if(penrose) return 4;
return S7-1;
}
void build_tmatrix() {
if(among(geometry, gBinaryTiling, gSol)) return; // unused
use_direct = (1 << (S7-1)) - 1;