← Back to team overview

kicad-developers team mailing list archive

Strange COLOR4D::LegacyMix( COLOR4D aColor ) optimization

 

Hi Jon,

When searching a fix to an issue in legacy mode (incorrect calculation of ORed wxColors), I had a
look at
COLOR4D::LegacyMix( COLOR4D aColor )

and for me the optimization to calculate the mix between 2 wxColors need more calculation than the
basic calculation.
optimization: normalize and convert 8 double to int, search in map and normalize 4 int to double
direct calculation (faster):
normalize and convert 6 double to int, and normalize 3 int to double.

Am I missed something?

Thanks.

-- 
Jean-Pierre CHARRAS


Follow ups