Tests/NUnit/H3Suite/TestPolyfill.cs
/// <summary>
/// Return true if the cell crosses the meridian.
/// </summary>
Return true if the cell crosses the meridian.
Return true if the cell crosses the meridian .
private static bool IsTransmeridianCell(H3Index h)
        {
            GeoBoundary boundary = h.ToGeoBoundary();
            decimal minLon = Constants.H3.M_PI, maxLon = -Constants.H3.M_PI;
            for (int i = 0; i < boundary.NumVerts; i++)
            {
                if (boundary.Verts[i].Longitude < minLon)
                {
                    minLon = boundary.Verts[i].Longitude;
                }
                if (boundary.Verts[i].Longitude > maxLon)
                {
                    maxLon = boundary.Verts[i].Longitude;
                }
            }
            return maxLon - minLon > Constants.H3.M_PI - (Constants.H3.M_PI / 4);
        }
private static bool IsTransmeridianCell ( H3Index h ) { GeoBoundary boundary = h . ToGeoBoundary ( ) ; decimal minLon = Constants . H3 . M_PI , maxLon = - Constants . H3 . M_PI ; for ( int i = 0 ; i < boundary . NumVerts ; i ++ ) { if ( boundary . Verts [ i ] . Longitude < minLon ) { minLon = boundary . Verts [ i ] . Longitude ; } if ( boundary . Verts [ i ] . Longitude > maxLon ) { maxLon = boundary . Verts [ i ] . Longitude ; } } return maxLon - minLon > Constants . H3 . M_PI - ( Constants . H3 . M_PI / 4 ) ; }
Return true if the cell crosses the meridian.
Return true if the cell crosses the meridian .
h
H3Index