diff options
author | hanemile <hanemile@protonmail.com> | 2019-01-12 21:32:11 +0100 |
---|---|---|
committer | hanemile <hanemile@protonmail.com> | 2019-01-12 21:32:11 +0100 |
commit | af81b075036ac7c581321f587a06576650dec331 (patch) | |
tree | 448be79c34d079a96a85e4ea3ddcb831c29ee7e9 /star.go | |
parent | 30fecdeaef86a04cad7a9f93a31ae9856ad4e473 (diff) |
added json attributes to objects
Diffstat (limited to 'star.go')
-rw-r--r-- | star.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/star.go b/star.go index 1486d5f..7450da5 100644 --- a/star.go +++ b/star.go @@ -2,9 +2,9 @@ package structs // Define a struct storing essential star information such as it's coordinate, velocity and mass type Star2D struct { - C Vec2 // coordinates of the star - V Vec2 // velocity of the star - M float64 // mass of the star + C Vec2 `json:C` // coordinates of the star + V Vec2 `json:V` // velocity of the star + M float64 `json:M` // mass of the star } func NewStar2D(c Vec2, v Vec2, m float64) Star2D { |