fromRgba method Null safety

void fromRgba(
  1. int r,
  2. int g,
  3. int b,
  4. int a,
  5. 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);
}