public void SetRowException2() { Matrix44F m = new Matrix44F(rowMajor, MatrixOrder.RowMajor); m.SetRow(4, Vector4F.One); }
public void SetRow() { Matrix44F m = new Matrix44F(rowMajor, MatrixOrder.RowMajor); m.SetRow(0, new Vector4F(0.1f, 0.2f, 0.3f, 0.4f)); Assert.AreEqual(new Vector4F(0.1f, 0.2f, 0.3f, 0.4f), m.GetRow(0)); Assert.AreEqual(new Vector4F(5.0f, 6.0f, 7.0f, 8.0f), m.GetRow(1)); Assert.AreEqual(new Vector4F(9.0f, 10.0f, 11.0f, 12.0f), m.GetRow(2)); Assert.AreEqual(new Vector4F(13.0f, 14.0f, 15.0f, 16.0f), m.GetRow(3)); m.SetRow(1, new Vector4F(0.4f, 0.5f, 0.6f, 0.7f)); Assert.AreEqual(new Vector4F(0.1f, 0.2f, 0.3f, 0.4f), m.GetRow(0)); Assert.AreEqual(new Vector4F(0.4f, 0.5f, 0.6f, 0.7f), m.GetRow(1)); Assert.AreEqual(new Vector4F(9.0f, 10.0f, 11.0f, 12.0f), m.GetRow(2)); Assert.AreEqual(new Vector4F(13.0f, 14.0f, 15.0f, 16.0f), m.GetRow(3)); m.SetRow(2, new Vector4F(0.7f, 0.8f, 0.9f, 1.0f)); Assert.AreEqual(new Vector4F(0.1f, 0.2f, 0.3f, 0.4f), m.GetRow(0)); Assert.AreEqual(new Vector4F(0.4f, 0.5f, 0.6f, 0.7f), m.GetRow(1)); Assert.AreEqual(new Vector4F(0.7f, 0.8f, 0.9f, 1.0f), m.GetRow(2)); Assert.AreEqual(new Vector4F(13.0f, 14.0f, 15.0f, 16.0f), m.GetRow(3)); m.SetRow(3, new Vector4F(1.7f, 1.8f, 1.9f, 1.3f)); Assert.AreEqual(new Vector4F(0.1f, 0.2f, 0.3f, 0.4f), m.GetRow(0)); Assert.AreEqual(new Vector4F(0.4f, 0.5f, 0.6f, 0.7f), m.GetRow(1)); Assert.AreEqual(new Vector4F(0.7f, 0.8f, 0.9f, 1.0f), m.GetRow(2)); Assert.AreEqual(new Vector4F(1.7f, 1.8f, 1.9f, 1.3f), m.GetRow(3)); }