diff options
author | Emile <hanemile@protonmail.com> | 2019-02-16 19:56:07 +0100 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-02-16 19:56:07 +0100 |
commit | b60ebe7b1f5b0c1eab011bd6a2137322e0c7a838 (patch) | |
tree | 9c09854ab2cd631514ba60e16a07ca88fc8a2a1d | |
parent | a1c8c0cc67a461c4d6a4371fb66a37c59604e695 (diff) |
implemented another test calculating the forces on a star
-rw-r--r-- | db_actions_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/db_actions_test.go b/db_actions_test.go index cb1fefd..230093a 100644 --- a/db_actions_test.go +++ b/db_actions_test.go @@ -107,6 +107,28 @@ func TestCalcAllForces(t *testing.T) { Y: 0, }, }, + { + name: "star in the far top right quadrant", + args: args{ + database: db, + star: structs.Star2D{ + C: structs.Vec2{ + X: 475, + Y: 25, + }, + V: structs.Vec2{ + X: 0, + Y: 0, + }, + M: 1000, + }, + theta: 1.5, + }, + want: structs.Vec2{ + X: -2.945139150499052e-10, + Y: -2.945139150499052e-10, + }, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { |