protected override void SetUp()
        {
            base.SetUp();
            southHemi = new S2Loop(northHemi);
            southHemi.Invert();

            eastHemi = new S2Loop(westHemi);
            eastHemi.Invert();

            farHemi = new S2Loop(nearHemi);
            farHemi.Invert();
        }
        protected override void SetUp()
        {
            base.SetUp();
            southHemi = new S2Loop(northHemi);
            southHemi.Invert();

            eastHemi = new S2Loop(westHemi);
            eastHemi.Invert();

            farHemi = new S2Loop(nearHemi);
            farHemi.Invert();
        }
        public void testBounds()
        {
            assertTrue(candyCane.RectBound.Lng.IsFull);
            assertTrue(candyCane.RectBound.LatLo.Degrees < -20);
            assertTrue(candyCane.RectBound.LatHi.Degrees > 10);
            assertTrue(smallNeCw.RectBound.IsFull);
            assertEquals(arctic80.RectBound,
                         new S2LatLngRect(S2LatLng.FromDegrees(80, -180), S2LatLng.FromDegrees(90, 180)));
            assertEquals(antarctic80.RectBound,
                         new S2LatLngRect(S2LatLng.FromDegrees(-90, -180), S2LatLng.FromDegrees(-80, 180)));

            arctic80.Invert();
            // The highest latitude of each edge is attained at its midpoint.
            var mid = (arctic80.Vertex(0) + arctic80.Vertex(1)) * 0.5;

            assertDoubleNear(arctic80.RectBound.LatHi.Radians, new S2LatLng(mid).Lat.Radians);
            arctic80.Invert();

            assertTrue(southHemi.RectBound.Lng.IsFull);
            assertEquals(southHemi.RectBound.Lat, new R1Interval(-S2.PiOver2, 0));
        }