udacity / sdc-issue-reports

29 stars 6 forks source link

Term 3, lesson 4, 16. Implement a Second Cost Function Typos #1445

Closed DominikMa closed 5 years ago

DominikMa commented 5 years ago

In the main.cpp on lines 18 to 21 there is the folloing code:

cost = inefficiency_cost(target_speed, 3, 3, lane_speeds);
cout << "The cost is " << cost << " for " << "(2, 2)" << endl;
cost = inefficiency_cost(target_speed, 2, 3, lane_speeds);
cout << "The cost is " << cost << " for " << "(2, 2)" << endl;

which should clearly be:

cost = inefficiency_cost(target_speed, 3, 3, lane_speeds);
cout << "The cost is " << cost << " for " << "(3, 3)" << endl;
cost = inefficiency_cost(target_speed, 2, 3, lane_speeds);
cout << "The cost is " << cost << " for " << "(2, 3)" << endl;
mvirgo commented 5 years ago

Good catch! Fixed (you'd have to reset the quiz to see the change).