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)); } }
public void TestSize(int level, int expectedSize) { Assert.That(MortonCode.Size(level), Is.EqualTo(expectedSize)); }