Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Small helper function to translate slider step values into
- * accelerated speed multipliers. The associative table is as follows:
- *
- * SLIDER_VALUE: 0 1 2 3 4 5 6 7 8 9 10 11
- * SPEED_MULTIP: 0.25 0.50 0.75 1.00 1.25 1.50 1.75 2.00 3.00 4.00 8.00 16.00
- */
- static double get_turbo_speed(int value)
- {
- double res;
- if (value >= 0 && <= 7) {
- res = 0.25 * (value + 1);
- } else if (value == 8 || value == 9) {
- res = value - 5;
- } else if (value == 10) {
- res = 8
- } else if (value == 11) {
- res = 16;
- }
- return res;
- }
Advertisement
Add Comment
Please, Sign In to add comment