Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Polygon ¶
Polygon defines a list of closed points that define a polygon.
func New ¶
New creates a new polygon from a whitespace separated list of comma separated coordinates e.g. `1,2 3,4 5,6`. A polygon contains at least 3 points.
func NewFromPoints ¶
NewFromPoints from a node list of `<Point x="1" y="2"/>` entities.
func (Polygon) BoundingRectangle ¶
BoundingRectangle returns the minimal rectangle containing all of the polygon's points.
func (Polygon) Inside ¶
Inside returns true if the given point lies within the polygon. Implementation: https://stackoverflow.com/questions/217578/how-can-i-determine-whether-a-2d-point-is-within-a-polygon
Click to show internal directories.
Click to hide internal directories.