示例#1
0
 public static Matrix3 operator -(Matrix3 M1, Matrix3 M2)
 {// An overloaded operator * to return the  difference of two matrix
     return(new Matrix3(M1.Row(0) - M2.Row(0), M1.Row(1) - M2.Row(1), M1.Row(2) - M2.Row(2)));
 }
示例#2
0
 /// <summary>
 /// simply adds each row from m1 to each row from m2
 /// using the Row(i)method below returning the added matrix
 /// </summary>
 /// <param name="M1"></param>
 /// <param name="M2"></param>
 /// <returns></returns>
 public static Matrix3 operator +(Matrix3 M1, Matrix3 M2)
 {// An overloaded operator + to return the  sum of two matrix
     return(new Matrix3(M1.Row(0) + M2.Row(0), M1.Row(1) + M2.Row(1), M1.Row(2) + M2.Row(2)));
 }