From: W. Trevor King Date: Fri, 22 Feb 2013 17:49:45 +0000 (-0500) Subject: scatter: fix stupid --vx0-energy minus sign X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ad40077b4ef3989dd78714a269fdb7a484540f4f;p=assignment-template.git scatter: fix stupid --vx0-energy minus sign --- diff --git a/scatter.c b/scatter.c index ed164ae..aa50c87 100644 --- 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");