예제 #1
0
        public void Test_CellUnionTarget_UpdateMinDistanceToEdgeWhenEqual()
        {
            var target = new S2MinDistanceCellUnionTarget(new S2CellUnion(
                                                              new List <S2CellId> {
                new S2CellId(MakePointOrDie("0:1"))
            }));
            var dist = S1ChordAngle.Infinity;
            var edge = ParsePointsOrDie("0:-1, 0:1");

            Assert.True(target.UpdateMinDistance(edge[0], edge[1], ref dist));
            Assert.False(target.UpdateMinDistance(edge[0], edge[1], ref dist));
        }
예제 #2
0
        public void Test_CellUnionTarget_UpdateMinDistanceToCellWhenEqual()
        {
            var target = new S2MinDistanceCellUnionTarget(new S2CellUnion(
                                                              new List <S2CellId> {
                new S2CellId(MakePointOrDie("0:1"))
            }));
            var dist = S1ChordAngle.Infinity;
            var cell = new S2Cell(new S2CellId(MakePointOrDie("0:0")));

            Assert.True(target.UpdateMinDistance(cell, ref dist));
            Assert.False(target.UpdateMinDistance(cell, ref dist));
        }