diff options
author | emile <hanemile@protonmail.com> | 2018-10-12 15:23:00 +0200 |
---|---|---|
committer | emile <hanemile@protonmail.com> | 2018-10-12 15:23:00 +0200 |
commit | 71b4d2ecf24bac70f0eefd6ec1107f441c3ca420 (patch) | |
tree | 0a067aa280748754df52608f2d0e50cf74bd46cd | |
parent | 4bc0947d30ca0fe36259aaae9138d60dce92ab87 (diff) |
Simplify code
-rw-r--r-- | forces/forces.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/forces/forces.go b/forces/forces.go index 1cab4a0..7e11549 100644 --- a/forces/forces.go +++ b/forces/forces.go @@ -12,7 +12,8 @@ import ( // The function return the force func forceActing(s1 structs.Star, s2 structs.Star) structs.Force { // Gravitational constant - var G = 6.674 * math.Pow(10, -11) + // var G = 6.674 * math.Pow(10, -11) + var G float64 = 6.674e-11 // Distance between the stars var r21 = math.Sqrt(math.Pow(s2.C.X-s1.C.X, 2) + math.Pow(s2.C.Y-s1.C.Y, 2)) |