예제 #1
0
    public void SetRow()
    {
      Matrix33D m = new Matrix33D(columnMajor, MatrixOrder.ColumnMajor);
      m.SetRow(0, new Vector3D(0.1, 0.2, 0.3));
      Assert.AreEqual(new Vector3D(0.1, 0.2, 0.3), m.GetRow(0));
      Assert.AreEqual(new Vector3D(4.0, 5.0, 6.0), m.GetRow(1));
      Assert.AreEqual(new Vector3D(7.0, 8.0, 9.0), m.GetRow(2));

      m.SetRow(1, new Vector3D(0.4, 0.5, 0.6));
      Assert.AreEqual(new Vector3D(0.1, 0.2, 0.3), m.GetRow(0));
      Assert.AreEqual(new Vector3D(0.4, 0.5, 0.6), m.GetRow(1));
      Assert.AreEqual(new Vector3D(7.0, 8.0, 9.0), m.GetRow(2));

      m.SetRow(2, new Vector3D(0.7, 0.8, 0.9));
      Assert.AreEqual(new Vector3D(0.1, 0.2, 0.3), m.GetRow(0));
      Assert.AreEqual(new Vector3D(0.4, 0.5, 0.6), m.GetRow(1));
      Assert.AreEqual(new Vector3D(0.7, 0.8, 0.9), m.GetRow(2));
    }
예제 #2
0
 public void SetRowException2()
 {
   Matrix33D m = new Matrix33D(columnMajor, MatrixOrder.ColumnMajor);
   m.SetRow(3, Vector3D.One);
 }
예제 #3
0
 public void SetRowException2()
 {
     Matrix33D m = new Matrix33D(columnMajor, MatrixOrder.ColumnMajor);
       m.SetRow(3, Vector3D.One);
 }
예제 #4
0
        public void SetRow()
        {
            Matrix33D m = new Matrix33D(columnMajor, MatrixOrder.ColumnMajor);
              m.SetRow(0, new Vector3D(0.1, 0.2, 0.3));
              Assert.AreEqual(new Vector3D(0.1, 0.2, 0.3), m.GetRow(0));
              Assert.AreEqual(new Vector3D(4.0, 5.0, 6.0), m.GetRow(1));
              Assert.AreEqual(new Vector3D(7.0, 8.0, 9.0), m.GetRow(2));

              m.SetRow(1, new Vector3D(0.4, 0.5, 0.6));
              Assert.AreEqual(new Vector3D(0.1, 0.2, 0.3), m.GetRow(0));
              Assert.AreEqual(new Vector3D(0.4, 0.5, 0.6), m.GetRow(1));
              Assert.AreEqual(new Vector3D(7.0, 8.0, 9.0), m.GetRow(2));

              m.SetRow(2, new Vector3D(0.7, 0.8, 0.9));
              Assert.AreEqual(new Vector3D(0.1, 0.2, 0.3), m.GetRow(0));
              Assert.AreEqual(new Vector3D(0.4, 0.5, 0.6), m.GetRow(1));
              Assert.AreEqual(new Vector3D(0.7, 0.8, 0.9), m.GetRow(2));
        }