Constructor MatrixFloat
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
MatrixFloat(int, int, float)
Initializes a new instance of the MatrixFloat class with the specified dimensions and fills the matrix with the given initial value.
public MatrixFloat(int width, int height, float initialValue)
Parameters
widthintThe width of the matrix.
heightintThe height of the matrix.
initialValuefloatThe value used to initialize all elements.
Exceptions
- ArgumentException
widthorheightis negative.
MatrixFloat(int, int, float[])
Initializes a new instance of the MatrixFloat class.
public MatrixFloat(int width, int height, float[] values = null)
Parameters
widthintThe width of the matrix.
heightintThe height of the matrix.
valuesfloat[]The values to initialize the matrix with. If null, or omitted, the matrix is initialized with zeros.
Exceptions
- ArgumentException
widthorheightis negative.