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

Vector BlitzLLVM

FloatVector3(x, y, z)
TypeVectorN(numbers or vectors)
Local v:TypeVectorN

Description

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

A vector is N numbers of one number type, kept as one value. The name of the type is the number type, Vector and the count from 1 to 1024: FloatVector3, IntVector4, DoubleVector2, Int8Vector3. Every number type has them. 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. Give it all numbers, one number for all of them, or vectors and numbers that add up to the size; with nothing it is all zeros, as is a vector declared without a value. \x \y \z \w (or \r \g \b \a) read and change the numbers of a vector of 2 to 4, several letters such as v\xy read a smaller vector, and v[2] is the third number.

+ - * /, Mod and ^ work on every number, between two vectors of the same size or a vector and a number; * between two vectors multiplies number by number, it is not a dot product. = and <> compare all numbers. Everything else, such as how the number types mix, functions that take and return them, and what is not there yet, is on Vectors and matrices.

Examples

Local position:FloatVector3 = FloatVector3(1, 2, 3)
Local velocity:FloatVector3 = FloatVector3(0.5, 0, -1)
position = position + velocity * 2
position\y = 10
Print position\x
Print position\y
Print position\z
Print position\zx\x
2.0
10.0
1.0
1.0

Related Commands

ULong BlitzLLVM, UShort BlitzLLVM

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally