Documentation ¶
Overview ¶
Package rect implements rectangles and can determine when rectanges intersect, are contained, and when rectangles lie adjacent
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Adjacency ¶
Adjacency detects whether two rectangles, r1, and r2, are adjacent. Adjacency is defined as the sharing of a side
func Containment ¶
Containment returns whether r2 is contained inside of r1
Types ¶
type Point ¶
type Point struct {
X, Y float64
}
Point is a struct defining a coordinates position on a 2D plane
func Intersection ¶
Intersection determine whether two rectangles, r1 and r2, have one or more intersecting lines and produce a result, []Point, identifying the points of intersection
Click to show internal directories.
Click to hide internal directories.