array[1] = (max - min) / max;
array[1] = ((float) (max - min)) / ((float) max);
  public static float[] RGBtoHSB(int red, int green, int blue, float array[])  {    if (array == null)      array = new float[3];    // Calculate brightness.    int min;    int max;    if (red < green)      {        min = red;        max = green;      }    else      {        min = green;        max = red;      }    if (blue > max)      max = blue;    else if (blue < min)      min = blue;    array[2] = max / 255f;    // Calculate saturation.    if (max == 0)      array[1] = 0;    else      array[1] = (max - min) / max;    // Calculate hue.    if (array[1] == 0)      array[0] = 0;    else      {        float delta = (max - min) * 6;        if (red == max)          array[0] = (green - blue) / delta;        else if (green == max)          array[0] = 1f / 3 + (blue - red) / delta;        else          array[0] = 2f / 3 + (red - green) / delta;        if (array[0] < 0)          array[0]++;      }    return array;  }