The velocity can not be negative. that's why I was using -1. A comment would make it clearer. Probably no need of using a define or const here.