Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (screenPt.x > 0.0f && screenPt.y > 0.0f && screenPt.x < window_w && screenPt.y < window_h) {
- const float dx = history[iter].x - float(x);
- const float dy = history[iter].y - float(y);
- const double dist = double(500.0f * std::sqrt(dx*dx + dy * dy));
- rolling_delta = std::min(rolling_delta, std::max(delta / (dist + 1e-5), delta_minimum*speed_mult));
- isOffScreen = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement