From 4cee03b9482f519e312b40ef4d969005a629c01e Mon Sep 17 00:00:00 2001 From: emile Date: Wed, 17 Oct 2018 14:04:02 +0200 Subject: The stars now get a random Mass when initialized from a file. --- csv/csv.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit 1.4.1