summaryrefslogtreecommitdiffstats
path: root/color.c
Commit message (Collapse)AuthorAgeFilesLines
* Use only integer math for hue comparisons.Tavian Barnes2014-03-201-18/+18
| | | | | This is more than 10x faster than how it started, and over 5x faster than the previous commit.
* Fix corner case in color_comparator() and clarify a comment.Tavian Barnes2014-03-201-4/+4
| | | | | | | If anum == 0 and bdenom == 0, we should check anum*sgn(adenom) < bnum*sgn(bdenom), not anum*adenom < bnum*bdenom.
* Make hue sorting 3x faster by avoiding atan2() calls.Tavian Barnes2014-03-201-16/+51
|
* Refactor hue comparator into color.c.Tavian Barnes2014-03-111-0/+22
|
* Allow different color spaces to be used for similarity measurement.Tavian Barnes2014-03-111-0/+119