private static void CompareS2LoopToShape(S2Loop loop, S2Shape shape) { MutableS2ShapeIndex index = new(); index.Add(shape); S2Cap cap = loop.GetCapBound(); var query = index.MakeS2ContainsPointQuery(); for (int iter = 0; iter < 100; ++iter) { S2Point point = S2Testing.SamplePoint(cap); Assert.Equal(loop.Contains(point), query.ShapeContains(index.Shape(0), point)); } }