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

moved binsearch to hyper.h

This commit is contained in:
Zeno Rogue
2020-03-31 20:06:18 +02:00
parent 0446e25ebf
commit af10592616
2 changed files with 12 additions and 9 deletions

View File

@@ -44,15 +44,6 @@ EX namespace reg3 {
/** \brief for adjacent directions a,b, next_dir[a][b] is the next direction adjacent to a, in (counter?)clockwise order from b */
EX int next_dir[16][16];
template<class T> ld binsearch(ld dmin, ld dmax, const T& f) {
for(int i=0; i<200; i++) {
ld d = (dmin + dmax) / 2;
if(f(d)) dmax = d;
else dmin = d;
}
return dmin;
}
EX void generate() {
if(S7 == 4) face = 3;