
Originally Posted by
HenrikOlsson
Yeah, when you do x= y // 50 it will do a divide by 50 and then give you the remainder which can't be more than 49, right?
If you first multiply the raw value by 2 it means you can then divide by 100 (instead of 50) and do modulo 100 (that's the // operator) to give you two digits after the decimal point. This won't increase the resolution, you'll still have 50 "steps" to the right of the decimal point but they will range from 0 to 98 instead of from 0 to 49.
Bookmarks