diff options
| author | Christine Dodrill <me@christine.website> | 2019-01-09 20:00:43 -0800 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2019-01-09 20:00:43 -0800 |
| commit | 54fceb8b197dc90cd5d8cc60fab0d1bcad8dcc9c (patch) | |
| tree | 09aa012e70689867e46ac8190e0b0b4871cf21fe /farbfeld/ff-primitive/vendor/github.com/fogleman/gg/point.go | |
| parent | 7628126032977d182af7e8ae56bc3809c294596c (diff) | |
| parent | ddbe51f7fcb3ce1c86e45c7f4a51836be4a91a4c (diff) | |
| download | x-54fceb8b197dc90cd5d8cc60fab0d1bcad8dcc9c.tar.xz x-54fceb8b197dc90cd5d8cc60fab0d1bcad8dcc9c.zip | |
la-baujmi: start on toki pona logic engine
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} -} |
