Update main.cpp

Fixed copy paste mistake, fixed integer arithmetic in velocity calculation.