Skip to content
Narta Xaymar Dirks edited this page Nov 26, 2026 · 1 revision

Matrix BlitzLLVM

FloatMatrix2x2(column1, column2)
TypeMatrixCxR(numbers or vectors)
Local m:TypeMatrixCxR

Description

BlitzLLVM This command does not exist in the original Blitz products. BlitzLLVM adds it.

A matrix is C columns of R numbers of one number type, kept as one value. The name of the type is the number type, Matrix, the width, x and the height: FloatMatrix4x3 is 4 columns of FloatVector3, DoubleMatrix2x2 is 2 by 2. Every number type has them, and each size is from 1 to 1024. Like a Float it is a value: copying one gives a second one and there is nothing to free.

The type name is also the function that makes one, from numbers, from one number for all of them, or from column vectors; with nothing it is all zeros. m[1] is the second column as a vector and m[1][0] is one number.

* between two matrices is the matrix product, a matrix times a vector multiplies it as a column, and a vector times a matrix as a row. + - /, Mod and ^ work number by number, and = and <> compare all numbers. The rest is on Vectors and matrices.

Examples

Local m:FloatMatrix2x2 = FloatMatrix2x2(FloatVector2(1, 2), FloatVector2(3, 4))
Print m[1][0]
Print m[0][1]
3.0
2.0

Related Commands

Int BlitzBasic, Long BlitzLLVM, Object BlitzBasic, Short BlitzLLVM

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally