Working with Vectors

BlitzMax Forums/BlitzMax Programming/Working with Vectors

[Edit] Oops, you posted the same solution while I was typing. :)

Meanwhile perhaps you could do like this ?

Type Vector
Field x:float
Field y:float

Function Create:Vector(x_in:float,y_in:float)
Local newVector:Vector = New Vector
NewVector.x = x_in
NewVector.y = y_in
Return newVector
End Function

End Type

CreateCar(Myvector) or
CreateCar(Vector.Create(x,y))