scatter: fix stupid --vx0-energy minus sign
authorW. Trevor King <wking@tremily.us>
Fri, 22 Feb 2013 17:49:45 +0000 (12:49 -0500)
committerW. Trevor King <wking@tremily.us>
Fri, 22 Feb 2013 17:49:45 +0000 (12:49 -0500)
scatter.c

index ed164aea7c5852894a486dfa5520d575c42398ca..aa50c876870ab0704f49e30a9262e7e3f50b16ba 100644 (file)
--- a/scatter.c
+++ b/scatter.c
@@ -343,7 +343,7 @@ void parse_args(int argc, char **argv, state_t *state, system_t *system,
                        state->x[2] = safe_strtod(optarg, "vx0");
                        break;
                case 'e':
-                       state->x[2] = -sqrt(2*safe_strtod(optarg, "vx0-energy")/system->m);
+                       state->x[2] = sqrt(2*safe_strtod(optarg, "vx0-energy")/system->m);
                        break;
                case 'Y':
                        state->x[3] = safe_strtod(optarg, "vy0");