1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-17 19:48:06 +00:00

rearranged init.cpp/hyper.h/classes.h/classes.cpp

This commit is contained in:
Zeno Rogue
2017-10-29 12:19:33 +01:00
parent 3ef7a1ed83
commit 17a1682e83
7 changed files with 358 additions and 343 deletions

View File

@@ -3,20 +3,7 @@
// basic utility functions
#if ISMOBILE || ISWEB || ISPANDORA || 1
typedef double ld;
#define LDF "%lf"
#define PLDF "lf"
#define ASINH asinh
#else
typedef long double ld;
#define LDF "%Lf"
#define PLDF "Lf"
#define ASINH asinhl
#endif
long double sqr(long double x) { return x*x; }
template<class T> int size(const T& x) {return int(x.size()); }
string its(int i) { char buf[64]; sprintf(buf, "%d", i); return buf; }
string fts(float x) { char buf[64]; sprintf(buf, "%4.2f", x); return buf; }
string fts3(float x) { char buf[64]; sprintf(buf, "%5.3f", x); return buf; }