Пример #1
0
    public void Equals()
    {
      FloatVector a = new FloatVector(2,4);
      FloatVector b = new FloatVector(2,4);
      FloatVector c = new FloatVector(2);
      c[0] = 4;
      c[1] = 4;

      FloatVector d = new FloatVector(2,5);
      FloatVector e = null;
      Assert.IsTrue(a.Equals(b));
      Assert.IsTrue(b.Equals(a));
      Assert.IsTrue(a.Equals(c));
      Assert.IsTrue(b.Equals(c));
      Assert.IsTrue(c.Equals(b));
      Assert.IsTrue(c.Equals(a));
      Assert.IsFalse(a.Equals(d));
      Assert.IsFalse(d.Equals(b));
      Assert.IsFalse(a.Equals(e));

    }