Example #1
0
        public void ClampToZero()
        {
            MatrixD m = new MatrixD(5, 6, 0.0000000000001);
              m.ClampToZero();
              Assert.AreEqual(new MatrixD(5, 6), m);

              m = new MatrixD(5, 6, 0.1);
              m.ClampToZero();
              Assert.AreEqual(new MatrixD(5, 6, 0.1), m);

              m = new MatrixD(5, 6, 0.001);
              m.ClampToZero(0.01);
              Assert.AreEqual(new MatrixD(5, 6), m);

              m = new MatrixD(5, 6, 0.1);
              m.ClampToZero(0.01);
              Assert.AreEqual(new MatrixD(5, 6, 0.1), m);
        }