diff --git a/src/variable.cpp b/src/variable.cpp index fd236b7102..29dbc69f0e 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -1597,8 +1597,8 @@ double Variable::collapse_tree(Tree *tree) if (tree->type == SIN) { arg1 = collapse_tree(tree->left); - tree->type = VALUE; if (tree->left->type != VALUE) return 0.0; + tree->type = VALUE; tree->value = sin(arg1); return tree->value; } diff --git a/src/velocity.cpp b/src/velocity.cpp index 1b7f982668..3a6226911d 100644 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -356,21 +356,21 @@ void Velocity::set(int narg, char **arg) xstr = new char[n]; strcpy(xstr,&arg[0][2]); } else if (strcmp(arg[0],"NULL") == 0) xstyle = NONE; - else vx = xscale * atof(arg[0]); + else vx = atof(arg[0]); if (strstr(arg[1],"v_") == arg[1]) { int n = strlen(&arg[1][2]) + 1; ystr = new char[n]; strcpy(ystr,&arg[1][2]); } else if (strcmp(arg[1],"NULL") == 0) ystyle = NONE; - else vy = yscale * atof(arg[1]); + else vy = atof(arg[1]); if (strstr(arg[2],"v_") == arg[2]) { int n = strlen(&arg[2][2]) + 1; zstr = new char[n]; strcpy(zstr,&arg[2][2]); } else if (strcmp(arg[2],"NULL") == 0) zstyle = NONE; - else vz = zscale * atof(arg[2]); + else vz = atof(arg[2]); // set and apply scale factors