mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 01:00:25 +00:00
gcd
This commit is contained in:
parent
e2e0fc2ff8
commit
36998c9a40
4
util.cpp
4
util.cpp
@ -27,6 +27,10 @@ string itsh(int i) {static char buf[16]; sprintf(buf, "%03X", i); return buf; }
|
||||
string itsh2(int i) {static char buf[16]; sprintf(buf, "%02X", i); return buf; }
|
||||
string itsh8(int i) {static char buf[16]; sprintf(buf, "%08X", i); return buf; }
|
||||
|
||||
int gcd(int i, int j) {
|
||||
return i ? gcd(j%i, i) : j;
|
||||
}
|
||||
|
||||
// debug utilities
|
||||
|
||||
extern FILE *debugfile;
|
||||
|
Loading…
Reference in New Issue
Block a user