diff options
Diffstat (limited to 'farbfeld/ff-primitive/vendor/github.com/fogleman/gg/point.go')
| -rw-r--r-- | farbfeld/ff-primitive/vendor/github.com/fogleman/gg/point.go | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/farbfeld/ff-primitive/vendor/github.com/fogleman/gg/point.go b/farbfeld/ff-primitive/vendor/github.com/fogleman/gg/point.go deleted file mode 100644 index d258653..0000000 --- a/farbfeld/ff-primitive/vendor/github.com/fogleman/gg/point.go +++ /dev/null @@ -1,25 +0,0 @@ -package gg - -import ( - "math" - - "golang.org/x/image/math/fixed" -) - -type Point struct { - X, Y float64 -} - -func (a Point) Fixed() fixed.Point26_6 { - return fixp(a.X, a.Y) -} - -func (a Point) Distance(b Point) float64 { - return math.Hypot(a.X-b.X, a.Y-b.Y) -} - -func (a Point) Interpolate(b Point, t float64) Point { - x := a.X + (b.X-a.X)*t - y := a.Y + (b.Y-a.Y)*t - return Point{x, y} -} |
