float delta = c.distanceToHSV(d);
assertEquals(0.0f, delta);
}
public void testColorList() {
ColorList list = new ColorList();
for (int i = 0; i < 10; i++) {
list.add(TColor.newHSV(MathUtils.random(1f), MathUtils.random(1f),
MathUtils.random(1f)));
}
AccessCriteria criteria = AccessCriteria.RED;
ColorList sorted = list.sortByCriteria(criteria, false);
ReadonlyTColor prev = null;
for (ReadonlyTColor c : sorted) {
System.out.println(c);
if (prev != null) {
assertTrue(prev.getComponentValue(criteria) <= c