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

Function coldist

sys/amiga/bmp2iff_host.c:72–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70/* --------------------------------------------------------- */
71
72static int
73coldist(const RGB *a, const RGB *b)
74{
75 int dr = a->r - b->r;
76 int dg = a->g - b->g;
77 int db = a->b - b->b;
78 return dr*dr + dg*dg + db*db;
79}
80
81static int
82nearest(const RGB *c, const RGB *pal, int n)

Callers 2

nearestFunction · 0.85
build_paletteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected