'
' This example demonstrates how to set up a 4x4 matrix,
' invert it and then trap whether the inversion was
' successful
'
' Create 4x4 matrices
dim m1 : set m1 = XSIMath.CreateMatrix4(_
2.0, 3.0, 0.0, 0.0, _
1.0, 4.0, 0.0, 0.0, _
0.0, 0.0, 1.0, 0.0, _
0.0, 0.0, 0.0, 1.0)
dim m2 : set m2 = XSIMath.CreateMatrix4
' Make the second matrix the inversion of the first
if m2.Invert(m1) then
Application.LogMessage "Success :-D"
else
Application.LogMessage "Failure :-("
end if
' Expected result:
' INFO : Success :-D |