コード例 #1
0
        public void ReturnsExpected()
        {
            var matrix = new NeighborMatrix(new Vec2(1, 1), (origin) => testData[origin.ToIndex(5)] == 1);

            Assert.True(matrix.IsSet(1 + 2 + 4));
            Assert.False(matrix.IsSet(8 + 128));
            Assert.True(matrix.IsSet(16 + 32 + 64));
        }
コード例 #2
0
        public void SpecificScenario()
        {
            var matrix = new NeighborMatrix(new Vec2(1, 1), (origin) => testData[origin.ToIndex(5)] == 1);

            Assert.False(matrix.IsSet(1 + 2 + 4 + 8 + 128));
        }