MCPcopy Create free account
hub / github.com/NetHack/NetHack / gcd

Function gcd

win/share/tileset.c:270–279  ·  view source on GitHub ↗

Return the greatest common divisor */

Source from the content-addressed store, hash-verified

268
269/* Return the greatest common divisor */
270static unsigned
271gcd(unsigned a, unsigned b)
272{
273 while (TRUE) {
274 if (b == 0) return a;
275 a %= b;
276 if (a == 0) return b;
277 b %= a;
278 }
279}
280
281static void
282split_tiles(const struct TileSetImage *image)

Callers 1

stretch_tileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected