I've encountered a problem with an uninitialized matrix. In case of uninitialized matrix, properties are being filled with the parameters of the identity matrix during first accessing of some properties (for example M11). But some other properties, for example Up, Down, etc., use the fields _m** directly. Uninitialized matrices are supposed to be identity, but accessing of Up, Down, etc. before accessing some other properties results in a zero vector.
Code to reproduce the issue:
var matrix = new XbimMatrix3D(); // Instance of a matrix whose _isNotDefaultInitialised is filled with false
// Debug.Assert(!matrix.Up.Length.IsZero()); // Fails but shouldn't
var _ = matrix.M11; // Forces filling by values of Identity matrix
Debug.Assert(!matrix.Up.Length.IsZero()); // Passes
Hello.
I've encountered a problem with an uninitialized matrix. In case of uninitialized matrix, properties are being filled with the parameters of the identity matrix during first accessing of some properties (for example M11). But some other properties, for example Up, Down, etc., use the fields _m** directly. Uninitialized matrices are supposed to be identity, but accessing of Up, Down, etc. before accessing some other properties results in a zero vector.
Code to reproduce the issue: