Correct numerical errors in roundedFrameSection calculation
In my project, I have a calendar view that scrolls horizontaly one month at a time:
When calling calendar.scrollToDate(), the calendar was scrolling to the wrong month anytime the specified date was a Sunday. Specifically, it was scrolling to the next previous month.
The problem is due to the formula floor(frameSection) in targetPointForItemAt(). Naturally, frameSection may have small numerical errors. For example, a Sunday may yield frameSection == 49.9999999999999. However, floor(49.9999999999999) == 49 when the correct calculation should be 50.
One potential fix, which is the one I'm submitting in this PR, is to reduce the numerical precision of frameSection from double to single before calling floor(). This correctly results in floor(50) == 50.