private int clamp(final int c){
  if (c < 0) {
    return 0;
  }
  if (c > 255) {
    return 255;
  }
  return c;
}

private int clamp ( final int c ) { if ( c < 0 ) { return 0 ; } if ( c > 255 ) { return 255 ; } return c ; }
clamp a number between 0 and 255
