예제 #1
0
 public static void AddTest()
 {
     Assert.That(() => VectorUtilities.Add(Vector128.Create(0.0f, 1.0f, 2.0f, 3.0f), Vector128.Create(4.0f, 5.0f, 6.0f, 7.0f)),
                 Is.EqualTo(Vector128.Create(4.0f, 6.0f, 8.0f, 10.0f))
                 );
 }
예제 #2
0
 /// <summary>
 /// Adds two identical size matrices.
 /// </summary>
 /// <param name="m1">First matrix for addition.</param>
 /// <param name="m2">Second matrix for addition.</param>
 /// <returns>The sum of the matrices.</returns>
 public static double[][] Add(this double[][] m1, double[][] m2)
 {
     return(VectorUtilities.Add(m1, m2));
 }