mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 10:56:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
	
		
			220 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
	
		
			220 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef MISC_GCD_H
 | 
						|
#define MISC_GCD_H
 | 
						|
 | 
						|
namespace Misc
 | 
						|
{
 | 
						|
    // TODO: replace to the std::gcd() when the C++17 will be available.
 | 
						|
    int gcd(int a, int b)
 | 
						|
    {
 | 
						|
        return b == 0 ? a : gcd(b, a % b);
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
#endif
 |