mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-30 21:42:59 +00:00 
			
		
		
		
	gcd
This commit is contained in:
		
							
								
								
									
										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 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; } | 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 | // debug utilities | ||||||
|  |  | ||||||
| extern FILE *debugfile; | extern FILE *debugfile; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue