Advertisement
blackretina

sourcesensitivity.cpp

May 30th, 2015
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. float oneDegreePerCM = 115.45;
  6. float mouseWidth = 7.0;
  7.  
  8. float mousepadSize;
  9. float degreesOfRotation;
  10. float mouseSpace;
  11. float degreesRequired;
  12. float sensitivity;
  13.  
  14. int main()
  15. {
  16. cout << "Enter mousepad size: ";
  17. cin >> mousepadSize;
  18. cout << "Enter desired degrees of rotation: ";
  19. cin >> degreesOfRotation;
  20. mouseSpace = mousepadSize - mouseWidth;
  21. degreesRequired = degreesOfRotation / mouseSpace;
  22. sensitivity = degreesRequired * oneDegreePerCM;
  23.  
  24. cout << "Sensitivity: " << sensitivity;
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement