Last active
September 24, 2023 21:05
-
-
Save martinshaw/027babba8d5c42b5eef479d8dc09bd98 to your computer and use it in GitHub Desktop.
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
f Main <String[] args> { | |
yield new \GeoChat\GeoServices\Coord < | |
\FloatUtils\Float _latitude, | |
\FloatUtils\Float _longitude | |
>; | |
f isContainedInPolygon <\GeoChat\GeoServices\Polygon _polygon>{ | |
// Check Contraints | |
\var rectangularCheck = Reduce <_polygon.points.asArray, Int> (_point, i) => { | |
\var latCheck = (_point.latitude < @_latitude); | |
\var longCheck = (_point.longitude < @_longitude) | |
} | |
return _polygon.contains <@.asArray> si yes : no; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment