This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var x = -40; | |
| var y = -60; | |
| var xp = new Array(-73,-33,7,-33); // Массив X-координат полигона | |
| var yp = new Array(-85,-126,-85,-45); // Массив Y-координат полигона | |
| function inPoly(x,y){ | |
| npol = xp.length; | |
| j = npol - 1; | |
| var c = 0; | |
| for (i = 0; i < npol;i++){ | |
| if ((((yp[i]<=y) && (y<yp[j])) || ((yp[j]<=y) && (y<yp[i]))) && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function dot_match(ByVal x0 As Double, ByVal y0 As Double, Polygon As Range) As Boolean | |
| Dim r, j As Integer | |
| Dim c As Boolean | |
| c = False | |
| j = Polygon.Rows.Count | |
| With Polygon | |
| For r = 1 To .Rows.Count | |
| If ((((.Cells(r, 2) <= y0) And (y0 < .Cells(j, 2))) Or ((.Cells(j, 2) <= y0) And (y0 < .Cells(r, 2)))) _ |
OlderNewer