Vectors

Blitz3D Forums/Blitz3D Beginners Area/Vectors

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You could just define as many of those temporary Tvectors as needed as globals, outside the function.

Type Tvector
	Field x#
	Field y#
	Field z#
End Type

Global u.Tvector = New Tvector

Function Acc.Tvector ()
    u\x = 0
    u\y = 0.1
    Return u
End Function

test.Tvector = Acc ()

Print test\x
Print test\y

MouseWait