Example #1
0
 public static void AreEqual(Vector expected, Vector actual, int digits = 2)
 {
     if (!VectorComparer.Equals(expected, actual, digits))
     {
         throw new AssertionException("Vectors are not equal\r\n" +
                                      $"Expected: {expected.ToString("F" + digits)}\r\v" +
                                      $"Actual:   {actual.ToString("F" + digits)}");
     }
 }
Example #2
0
        public bool Equals(Vector?x, Vector?y)
        {
            if (x == null && y == null)
            {
                return(true);
            }

            if (x == null || y == null)
            {
                return(false);
            }

            return(VectorComparer.Equals(x.Value, y.Value, this.digits));
        }