public void TestDecode(int index, int x, int y)
        {
            var p = MortonCode.Decode(index);

            Assert.That(p.X, Is.EqualTo(x));
            Assert.That(p.Y, Is.EqualTo(y));
        }
        public void TestDecodeEncode(int level)
        {
            int n = MortonCode.Size(level);

            for (int i = 0; i < n; i++)
            {
                var p      = MortonCode.Decode(i);
                int encode = MortonCode.Encode((int)p.X, (int)p.Y);
                Assert.That(encode, Is.EqualTo(i));
            }
        }