Advertisement
Guest User

Untitled

a guest
Apr 17th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.18 KB | None | 0 0
  1. int acc;
  2. if (input >= 0)
  3.     acc = 0;
  4. else
  5.     acc = 1023;
  6. int temp = input + acc;
  7. if (temp >= 0)
  8.     temp = temp % 1024;
  9. else
  10.     temp = (1024 - ((-temp) % 1024));
  11. temp -= acc;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement