toxi.color
Class RGBDistanceProxy

java.lang.Object
  extended by toxi.color.RGBDistanceProxy
All Implemented Interfaces:
DistanceProxy

public class RGBDistanceProxy
extends java.lang.Object
implements DistanceProxy

Implements the DistanceProxy interface to sort colors by RGB distance (used by ColorList.sortByDistance(DistanceProxy, boolean)).


Constructor Summary
RGBDistanceProxy()
           
 
Method Summary
 float distanceBetween(ReadonlyTColor a, ReadonlyTColor b)
          Computes the distance between 2 colors.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RGBDistanceProxy

public RGBDistanceProxy()
Method Detail

distanceBetween

public float distanceBetween(ReadonlyTColor a,
                             ReadonlyTColor b)
Description copied from interface: DistanceProxy
Computes the distance between 2 colors.

Specified by:
distanceBetween in interface DistanceProxy
Returns:
distance