public void TestGetRelationalOperationFunctionEqualsTo() { var func = WaveMath.GetRelationalOperationFunction(WaveMath.RelationalOperatorEnum.EqualsTo); Assert.AreEqual(1, func(0, 0)); Assert.AreEqual(0, func(0, 1)); Assert.AreEqual(0, func(1, 0)); Assert.AreEqual(1, func(1, 1)); Assert.AreEqual(0, func(0, -1)); Assert.AreEqual(0, func(-1, 0)); Assert.AreEqual(1, func(-1, -1)); }
public void TestGetRelationalOperationFunctionGreaterOrEqualsThan() { var func = WaveMath.GetRelationalOperationFunction(WaveMath.RelationalOperatorEnum.GreaterOrEqualsThan); Assert.AreEqual(1, func(0, 0)); Assert.AreEqual(0, func(0, 1)); Assert.AreEqual(1, func(1, 0)); Assert.AreEqual(1, func(1, 1)); Assert.AreEqual(1, func(0, -1)); Assert.AreEqual(0, func(-1, 0)); Assert.AreEqual(1, func(-1, -1)); }