public void Test_EdgeTarget_UpdateMinDistanceToCellWhenEqual() { var target = new S2MinDistanceEdgeTarget( MakePointOrDie("1:0"), MakePointOrDie("1: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)); }
public void Test_EdgeTarget_UpdateMinDistanceToEdgeWhenEqual() { var target = new S2MinDistanceEdgeTarget( MakePointOrDie("1:0"), MakePointOrDie("1: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)); }