diff options
author | emile <hanemile@protonmail.com> | 2018-10-17 14:04:02 +0200 |
---|---|---|
committer | emile <hanemile@protonmail.com> | 2018-10-17 14:04:02 +0200 |
commit | 4cee03b9482f519e312b40ef4d969005a629c01e (patch) | |
tree | 5a09ec01e802fd9550a10c605a35c77ee5050daa /csv | |
parent | 079789a3d5bf873a2403dfe357b06d1a72463251 (diff) |
The stars now get a random Mass when initialized from a file.
Diffstat (limited to 'csv')
-rw-r--r-- | csv/csv.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/csv/csv.go b/csv/csv.go index aca131b..bef3bd9 100644 --- a/csv/csv.go +++ b/csv/csv.go @@ -4,6 +4,7 @@ import ( "../file" "../structs" "git.darknebu.la/bit/logplus" + "math/rand" "strconv" ) @@ -29,7 +30,7 @@ func Import(path string, start int, end int, slice []structs.Star2D) []structs.S // Create a temporary star for assembling the star tempStar := structs.Star2D{ C: structs.Vec2{X: x, Y: y}, - M: 50000, + M: float64(rand.Intn(50000)), } // Add the Temporary star to the slice |