JosephClay / beyond-beyaan

Automatically exported from code.google.com/p/beyond-beyaan
Other
0 stars 0 forks source link

Slider won't slide to last item if amount of items are odd #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have a slider that have odd number of items
2. Click and drag the slider to end

What is the expected output? 

Slider should be dragged to the last item

What do you see instead?

It stops at second to last item.

Original issue reported on code.google.com by zeraa...@gmail.com on 17 Apr 2011 at 6:46

GoogleCodeExporter commented 9 years ago
Found the cause of this.  It was an issue with rounding, I cast from float to 
int, which basically rounded down anything less than 1 (.9 becomes 0), so I 
solved this by adding 0.5 before casting, so it'd round up.

Original comment by zeraa...@gmail.com on 17 Apr 2011 at 7:42

GoogleCodeExporter commented 9 years ago

Original comment by zeraa...@gmail.com on 10 Aug 2011 at 3:05