From af81b075036ac7c581321f587a06576650dec331 Mon Sep 17 00:00:00 2001 From: hanemile Date: Sat, 12 Jan 2019 21:32:11 +0100 Subject: added json attributes to objects --- vector2D.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vector2D.go') diff --git a/vector2D.go b/vector2D.go index 2b95a72..551391d 100644 --- a/vector2D.go +++ b/vector2D.go @@ -5,7 +5,8 @@ import ( ) type Vec2 struct { - X, Y float64 + X float64 `json:X` + Y float64 `json:Y` } // newVec2 returns a new Vec2 using the given coordinates -- cgit 1.4.1