CEngine Module

Miscellaneous Forums/Blitz Showcase/CEngine Module

Noel, I found something odd.

In your CMatrix type, there is a Copy() method.
Why not just do:
	Method Copy:CMatrix()
		Return Self.Copy()
	End Method

That uses the Blitz Object's native Copy method.
Or better still:
	Method Copy:CMatrix()
		Local dest:CMatrix = New CMatrix
		Local source:CMatrix = Self
		MemCopy( Varptr dest, Varptr source, 64 )
		Return dest
	End Method


What strikes me as odd is the following:
   n.m21 = m21
and 2 lines further:
   n.m21 = m23


Why is m21 assigned twice and is m33 left out alltogether?
Isn't this supposed to be a direct copy?

I heard you had some weird behaviour with your lib, perhaps this is the reason why..