1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-24 18:37:39 +00:00

cleanup of mercator_fix

This commit is contained in:
Zeno Rogue
2019-08-14 18:58:42 +02:00
parent 9d573ebd07
commit 2c073c1ec1
3 changed files with 16 additions and 20 deletions

View File

@@ -28,6 +28,9 @@ int SDL_GetTicks() {
EX long double sqr(long double x) { return x*x; }
EX ld round_nearest(ld x) { if(x > 0) return int(x+.5); else return -int(.5-x); }
EX ld round_nearest(ld x, ld multiple_of) { return multiple_of * round_nearest(x / multiple_of); }
EX int gcd(int i, int j) {
return i ? gcd(j%i, i) : j;
}