コード例 #1
0
        public void IsClockwiseGeofence()
        {
            var verts = new[]
            {
                new GeoCoord(0m, 0m), new GeoCoord(0.1m, 0.1m),
                new GeoCoord(0m, 0.1m)
            };

            var geofence = new GeoFence {
                NumVerts = 3, Verts = verts
            };

            Assert.IsTrue(geofence.IsClockwise());
        }
コード例 #2
0
        public void IsClockwiseGeofenceTransmeridian()
        {
            decimal[,] raw =
            {
                {  0.4m, Constants.H3.M_PI - 0.1m  },
                {  0.4m, -Constants.H3.M_PI + 0.1m },
                { -0.4m, -Constants.H3.M_PI + 0.1m },
                { -0.4m, Constants.H3.M_PI - 0.1m  }
            };
            var verts    = MakeGeoCoordArray(raw);
            var geofence = new GeoFence {
                NumVerts = 4, Verts = verts
            };

            Assert.IsTrue(geofence.IsClockwise());
        }