Example #1
0
        public void SetColumn()
        {
            Matrix22D m = new Matrix22D(columnMajor, MatrixOrder.ColumnMajor);

            m.SetColumn(0, new Vector2D(0.1, 0.2));
            Assert.AreEqual(new Vector2D(0.1, 0.2), m.GetColumn(0));
            Assert.AreEqual(new Vector2D(2.0, 4.0), m.GetColumn(1));

            m.SetColumn(1, new Vector2D(0.4, 0.5));
            Assert.AreEqual(new Vector2D(0.1, 0.2), m.GetColumn(0));
            Assert.AreEqual(new Vector2D(0.4, 0.5), m.GetColumn(1));
        }
Example #2
0
        public void SetColumnException2()
        {
            Matrix22D m = new Matrix22D(columnMajor, MatrixOrder.ColumnMajor);

            m.SetColumn(2, Vector2D.One);
        }
Example #3
0
 public void SetColumnException2()
 {
     Matrix22D m = new Matrix22D(columnMajor, MatrixOrder.ColumnMajor);
       m.SetColumn(2, Vector2D.One);
 }
Example #4
0
        public void SetColumn()
        {
            Matrix22D m = new Matrix22D(columnMajor, MatrixOrder.ColumnMajor);
              m.SetColumn(0, new Vector2D(0.1, 0.2));
              Assert.AreEqual(new Vector2D(0.1, 0.2), m.GetColumn(0));
              Assert.AreEqual(new Vector2D(2.0, 4.0), m.GetColumn(1));

              m.SetColumn(1, new Vector2D(0.4, 0.5));
              Assert.AreEqual(new Vector2D(0.1, 0.2), m.GetColumn(0));
              Assert.AreEqual(new Vector2D(0.4, 0.5), m.GetColumn(1));
        }