public static bool IsSimilarity(RNdObject o1, RNdObject o2) { for (int i = 0; i < o1.Shape.Length; i++) { if (o1.Shape[i] != o2.Shape[i]) { return(false); } } return(true); }
public static RNdObject operator -(RNdObject o1, RNdObject o2) { if ((o1.GetType()) == (o2.GetType())) { if (RNdObject.IsSimilarity(o1, o2)) { var x = o1.Clone(); for (int i = 0; i < o1.Length; i++) { x.Data[i] = o1.Data[i] - o2.Data[i]; } return(x); } else { return(null); } } else { return(null); } }