diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2023-08-26 11:08:17 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2023-08-26 11:08:17 +0200 |
| commit | 03adccc9ec7a84a08f9d62287b42e09ce2b2963e (patch) | |
| tree | ddbfe089cbf85c4b5b291e597bdcfce1f0b6f54f /geometry.go | |
| parent | bfd7f2ed0499f8285c41cf18c3a3cb16a08a95f5 (diff) | |
refactor: Use standard geom
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 |
