diff options
Diffstat (limited to 'geometry.go')
| -rw-r--r-- | geometry.go | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/geometry.go b/geometry.go index 1398f00..89eb1ed 100644 --- a/geometry.go +++ b/geometry.go @@ -1,14 +1,6 @@ package main -type Vec struct { - X, Y float64 -} +import "image" -type Rectangle struct { - leftTop Vec - rightBottom Vec -} - -func (r Rectangle) Contains(point Vec) bool { - return point.X > r.leftTop.X && point.X < r.rightBottom.X && point.Y > r.leftTop.Y && point.Y < r.rightBottom.Y -} +type Rectangle = image.Rectangle +type Point = image.Point |
