about summary refs log tree commit diff
path: root/structs
diff options
context:
space:
mode:
Diffstat (limited to 'structs')
-rw-r--r--structs/vector2D.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/structs/vector2D.go b/structs/vector2D.go
index 47e457f..6beedb2 100644
--- a/structs/vector2D.go
+++ b/structs/vector2D.go
@@ -8,6 +8,14 @@ type Vec2 struct {
 	X, Y float64
 }
 
+// newVec2 returns a new Vec2 using the given coordinates
+func newVec2(x float64, y float64) *Vec2 {
+	return &Vec2{
+		X: x,
+		Y: y,
+	}
+}
+
 // creates a copy of the vector
 func (v *Vec2) Copy() Vec2 {
 	return Vec2{v.X, v.Y}