From 38a7ea68053f6e0e807c9ab4b17f4172a0c54332 Mon Sep 17 00:00:00 2001 From: Stephen McQuay Date: Tue, 3 Sep 2013 23:32:36 -0700 Subject: [PATCH] moved geom to vector package --- geom.go | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 geom.go diff --git a/geom.go b/geom.go deleted file mode 100644 index b8be0fd..0000000 --- a/geom.go +++ /dev/null @@ -1,16 +0,0 @@ -package main - -import ( - v "bitbucket.org/hackerbots/vector" -) - -func distance(p1, p2 v.Point2d) float64 { - return p1.Sub(p2).Mag() -} - -func move(d1, d2 v.Point2d, velocity float64, timeDelta float64) v.Point2d { - v := d2.Sub(d1) - v_norm := v.Normalize() - v_scaled := v_norm.Scale(velocity * timeDelta) - return d1.Add(v_scaled) -}