public static bool SignalsPhaseShiftsAreEqual(List <float> l1, List <float> l2) { if (l1.Count != l2.Count) { return(false); } for (int i = 0; i < l1.Count; i++) { l1[i] = UnitTestUtitlities.RoundPhaseShift(l1[i]); l2[i] = UnitTestUtitlities.RoundPhaseShift(l2[i]); if ((!float.IsNaN(l1[i]) && float.IsNaN(l2[i])) || (float.IsNaN(l1[i]) && !float.IsNaN(l2[i]))) { return(false); } else if (Math.Abs(l1[i] - l2[i]) > 0.0001) { //Console.WriteLine(i.ToString() + " " + l1[i].ToString() + " " + l2[i].ToString()); return(false); } } return(true); }