aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301
diff options
context:
space:
mode:
Diffstat (limited to 'ee1301')
-rw-r--r--ee1301/wk6/lab5/vectorArray.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ee1301/wk6/lab5/vectorArray.cpp b/ee1301/wk6/lab5/vectorArray.cpp
index 279988c..8d2ad38 100644
--- a/ee1301/wk6/lab5/vectorArray.cpp
+++ b/ee1301/wk6/lab5/vectorArray.cpp
@@ -34,7 +34,7 @@ double randVec() {
double momentum(double velocity) {
double mass;
- if (rand()%2+1==1) {
+ if (rand()%2+1==0) {
mass=rand()%10+1;
} else {
mass=rand()%10*-1+1;