この行列の逆行列(特異でない場合)を求めます(this = this^-1)。
Int32 SIMatrix4.InvertInPlace(); |
oBoolean = SIMatrix4.InvertInPlace(); |
Boolean。この行列が逆行列を持つ(特異でない)場合は True、逆行列を持たない場合は false。
/* This example demonstrates how to set up a 4x4 matrix, invert it and then trap whether the inversion was successful */ // Create 4x4 matrices var aValues = new Array( 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 ); var m1 = XSIMath.CreateMatrix4(aValues); var m2 = XSIMath.CreateMatrix4(); // Make the second matrix the inversion of the first if ( m2.InvertInPlace() ) { Application.LogMessage( "Success :-D" ); } else { Application.LogMessage( "Failure :-(" ); } // Expected result: // INFO : Success :-D |