MCPcopy Create free account
hub / github.com/assimp/assimp / GetColorDifference

Function GetColorDifference

code/PostProcessing/ProcessHelper.h:250–253  ·  view source on GitHub ↗

------------------------------------------------------------------------------- Little helper function to calculate the quadratic difference * of two colors. * @param pColor1 First color * @param pColor2 second color * @return Quadratic color difference */

Source from the content-addressed store, hash-verified

248 * @param pColor2 second color
249 * @return Quadratic color difference */
250inline ai_real GetColorDifference(const aiColor4D &pColor1, const aiColor4D &pColor2) {
251 const aiColor4D c(pColor1.r - pColor2.r, pColor1.g - pColor2.g, pColor1.b - pColor2.b, pColor1.a - pColor2.a);
252 return c.r * c.r + c.g * c.g + c.b * c.b + c.a * c.a;
253}
254
255// -------------------------------------------------------------------------------
256/** @brief Extract single strings from a list of identifiers

Callers 2

CompareArraysFunction · 0.85
operator ()Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected