distance method
override
Returns the distance between two pixels in the pixel format.
What constitutes distance is not defined by this method, and is up to the pixel format to define. For example, both abgr8888 and floatRgba use cartesian distance to compare pixels.
Implementation
@override
double distance(int a, int b) => (a - b).abs().toDouble();