Reading this code, it's not immediately obvious what ballD or ballS refers to.  BallS in particular reads like balls.  Might be better to just make this ballSpeeds