03-10-2005, 04:34 PM
BTW, for Matrices you can also use a 2D pointer array. This is what I'm using in my bootleg 3d math library
Code:
#define MATRIX4X4 Single Ptr Ptr
'PtrArray2D part of Extra Lib (library of extra functions I'm working on.)
Function PtrArray2D(Byval rows As Integer, Byval cols As Integer,Byval bytes As Integer) As Any Ptr Ptr
Dim tempptr As Any Ptr Ptr
tempptr = Callocate(rows * bytes)
For i = 0 To rows - 1
tempptr[i] = Callocate(cols * bytes)
Next i
PtrArray2D = tempptr
End Function
Dim global As MATRIX4X4
global = PtrArray2D(4, 4, Len(Single))
global[1][1] = 24.653