/** * Perform velocity approximation based on 2D 'mickeys' (mouse motion delta). * return true if non-visible state reset is suggested */ BOOL ProcessVelocityData2D(DeviceVelocityPtr vel, double dx, double dy, int time) { double velocity; vel->last_velocity = vel->velocity; FeedTrackers(vel, dx, dy, time); velocity = QueryTrackers(vel, time); vel->velocity = velocity; return velocity == 0; }
/** * Perform velocity approximation based on 2D 'mickeys' (mouse motion delta). * return true if non-visible state reset is suggested */ short ProcessVelocityData2D( DeviceVelocityPtr vel, int dx, int dy, int time) { float velocity; vel->last_velocity = vel->velocity; FeedTrackers(vel, dx, dy, time); velocity = QueryTrackers(vel, time); vel->velocity = velocity; return velocity == 0; }