MCPcopy Create free account
hub / github.com/DentonW/DevIL / Distance

Function Distance

DevIL/src-IL/src/il_dds-save.cpp:1152–1157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1150
1151
1152ILuint Distance(Color888 *c1, Color888 *c2)
1153{
1154 return (c1->r - c2->r) * (c1->r - c2->r) +
1155 (c1->g - c2->g) * (c1->g - c2->g) +
1156 (c1->b - c2->b) * (c1->b - c2->b);
1157}
1158
1159#define Sum(c) ((c)->r + (c)->g + (c)->b)
1160#define NormSquared(c) ((c)->r * (c)->r + (c)->g * (c)->g + (c)->b * (c)->b)

Callers 1

GenBitMaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected