fromRgba method

void fromRgba (int r, int g, int b, int a, Vector4 result)

Convert a color with r, g, b and a component between 0 and 255 to a color with values between 0.0 and 1.0 and store it in result.

Implementation

static void fromRgba(int r, int g, int b, int a, Vector4 result) {
  result.setValues(r / 255.0, g / 255.0, b / 255.0, a / 255.0);
}