54 int Add(
int rotation,
int delta) {
56 return (rotation > 0) - (rotation < 0);
57 if ((rotation > 0 && m_rotation < 0) || (rotation < 0 && m_rotation > 0))
59 m_rotation += rotation;
62 const int steps = m_rotation / delta;
63 m_rotation -= steps * delta;
68 void Reset() { m_rotation = 0; }
Definition: WheelSteps.h:40
void Reset()
Forget any partial step, e.g. when the wheel starts acting on something else.
Definition: WheelSteps.h:68
int Add(int rotation, int delta)
Add one wheel event's rotation; return the number of whole steps it completes.
Definition: WheelSteps.h:54