diff options
author | emile <hanemile@protonmail.com> | 2018-10-10 21:45:51 +0200 |
---|---|---|
committer | emile <hanemile@protonmail.com> | 2018-10-10 21:45:51 +0200 |
commit | f42b7bbaf88b205914d657327c743c0a15e40c8b (patch) | |
tree | 333ca8b5e5c2d2f8ee8f26393ee65d670dd3fc50 /forces | |
parent | 2d1492140872c51093e3ca11d9935ef78e919b63 (diff) |
converted snake_case variables to camelCase
Diffstat (limited to 'forces')
-rw-r--r-- | forces/forces.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/forces/forces.go b/forces/forces.go index 5eaff5f..e36e49c 100644 --- a/forces/forces.go +++ b/forces/forces.go @@ -20,11 +20,11 @@ func forceActing(s1 structs.Star, s2 structs.Star) structs.Force { rhat := structs.Force{s2.C.X - s1.C.X, s2.C.Y - s1.C.Y} // Calculate how strong the star is affected - var F_scalar = G * (s1.Mass * s2.Mass) / math.Pow(math.Abs(r21), 2) + var FScalar = G * (s1.Mass * s2.Mass) / math.Pow(math.Abs(r21), 2) // Calculate the overall force by combining the scalar and the vector - var Fx = F_scalar * rhat.X - var Fy = F_scalar * rhat.Y + var Fx = FScalar * rhat.X + var Fy = FScalar * rhat.Y // Pack the forces in a force structur F := structs.Force{Fx, Fy} @@ -36,7 +36,6 @@ func forceActing(s1 structs.Star, s2 structs.Star) structs.Force { func forces(stars_arr []structs.Star, nr int) structs.Force { var force structs.Force - // Iterate over all the stars in the stars_arr for index := range stars_arr { |