maxDistance method

int maxDistance(
  1. PColorRGB other
)

Implementation

int maxDistance(PColorRGB other) {
  var rd = (r - other.r).abs();
  var gd = (g - other.g).abs();
  var bd = (b - other.b).abs();
  var ad = (a - other.a).abs();

  return math.max(rd, math.max(gd, math.max(bd, ad)));
}