diff options
Diffstat (limited to 'vector2D.go')
-rw-r--r-- | vector2D.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vector2D.go b/vector2D.go index 6beedb2..2b95a72 100644 --- a/vector2D.go +++ b/vector2D.go @@ -9,8 +9,8 @@ type Vec2 struct { } // newVec2 returns a new Vec2 using the given coordinates -func newVec2(x float64, y float64) *Vec2 { - return &Vec2{ +func NewVec2(x float64, y float64) Vec2 { + return Vec2{ X: x, Y: y, } |