weiyongsheng/polygon

点在多边形内

1.1.1 2017-04-15 09:53 UTC

This package is auto-updated.

Last update: 2024-09-05 16:56:39 UTC


README

点在多边形内

用法

$polygon = new \Polygon\Polygon([
    [0, 0],
    [0, 1],
    [1, 1],
    [1, 0],
]);
var_dump($polygon->contain(0.5, 0.5)); // return bool(true)