`import "s.mcquay.me/dm/rect"`

Package rect implements rectangles and can determine when rectanges intersect, are contained, and when rectangles lie adjacent

- func Adjacency(r1, r2 Rectangle) bool
- func Containment(r1, r2 Rectangle) bool
- func Intersection(r1, r2 Rectangle) []Point
- type Point
- type Rectangle

doc.go line.go point.go rectangle.go triangle.go

Adjacency detects whether two rectangles, r1, and r2, are adjacent. Adjacency is defined as the sharing of a side

Containment returns whether r2 is contained inside of r1

Intersection determine whether two rectangles, r1 and r2, have one or more intersecting lines and produce a result, []Point, identifying the points of intersection

Point is a struct defining a coordinates position on a 2D plane

Rectangle struct defines a plane figure with four straight sides and four right angles, which contains 4 vertixes points, P1 through P4

IsRect determins if the rectangle provided really is a rectangle, which by definition means a plane figure with four straight sides and four right angles.

Package rect imports 3 packages (graph). Updated 2017-06-28. Refresh now. Tools for package owners.