Beispiel #1
0
        [Fact] public void ZeroRectMatrix()
        {
            var m = MathS.Matrix(new Entity[, ] {
                { 0, 0, 0 },
                { 0, 0, 0 }
            });

            Assert.Equal(m, MathS.ZeroMatrix(2, 3));
        }
Beispiel #2
0
 [Fact] public void WithMatrix1()
 {
     var m = MathS.ZeroMatrix(6).With
                 ((r, c, e) => (r, c, e) switch
     {
         (_, < 1, _) => 1,
         (>= 1 and <= 4, >= 1 and <= 3, _) => 2,
         (>= 1 and <= 4, > 3, _) => 3,
         (5, 5, _) => 4,
         _ => e
     });