Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int acc;
- if (input >= 0)
- acc = 0;
- else
- acc = 1023;
- int temp = input + acc;
- if (temp >= 0)
- temp = temp % 1024;
- else
- temp = (1024 - ((-temp) % 1024));
- temp -= acc;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement