Пример #1
0
        public void Test_S2Cap_EncodeDecode()
        {
            S2Cap   cap     = S2Cap.FromCenterHeight(new S2Point(3, 2, 1).Normalize(), 1);
            Encoder encoder = new();

            cap.Encode(encoder);
            var decoder = encoder.Decoder();

            var(success, decoded_cap) = S2Cap.Decode(decoder);
            Assert.True(success);
            Assert.Equal(cap, decoded_cap);
        }