constant

fun constant(color: ColorRGBa, ignoreAlpha: Boolean = true): Matrix55(source)

Creates a 5x5 matrix based on the given color values.

Return

A 5x5 matrix (Matrix55) with the r, g, b components set in the corresponding matrix columns, and the alpha value determined by the ignoreAlpha parameter.

Parameters

color

The color represented as an instance of ColorRGBa, where the r, g, b, and alpha components will be used to modify the matrix.

ignoreAlpha

A boolean flag indicating whether the alpha component of the color should be ignored. If true, the alpha value in the matrix will be set to 0.0. Defaults to true.