Guest User

Untitled

a guest
Feb 15th, 2014
722
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. inline void LimitSpeed(QPointF& speed, float limit = 3.5) {
  2.     float speedAbs = Distance(QPointF(), speed);
  3.     if (speedAbs > limit) {
  4.         speed = (speed / speedAbs) * limit;
  5.     }
  6. }
RAW Paste Data