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(Float32x4 a, Float32x4 b) {
var d = a - b;
d *= d;
return d.x + d.y + d.z + d.w;
}