Created
August 3, 2020 16:17
-
-
Save MicrowaveDev/958a628491d812a0ec207b0122741ad1 to your computer and use it in GitHub Desktop.
PolygonCheckerV2
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
import "./PolygonUtils.sol"; | |
contract PolygonChecker { | |
mapping(uint256 => PolygonUtils.PolygonData) polygons; | |
function addPolygonPoint(uint256 polygonId, int256[2] memory point) public { | |
polygons[polygonId].points.push(point); | |
} | |
function isInsidePolygonById(int256[2] memory _point, uint256 _polygonId) public view returns (bool) { | |
return PolygonUtils.isInsidePolygon(polygons[_polygonId], _point); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment