sorry, I don't see where you divide by 0. As I understand this could happen if we call getDeltaX twice with the same event object that has the same timestamp, but I don't see how this could happen ?