These functions help a component work with "fractional selection". This notion can be very helpful in modeling components such as carousels (e.g., Carousel, in which the selection state during user interaction may be partway between one item and the next. With fractional selection, we add a real number between 0 and 1 to a selected index to obtain a fractional selection value.
Consider a carousel displaying a set of images. Suppose the image at index 3
is selected. The carousel's selectedIndex state at this point is 3. The
user begins dragging the carousel with their finger. Image 3 moves out of
view, and the image 4 moves into view. When the user is halfway through this
operation, we might say that the fractional selection value is 3.5.
Eventually, the user releases their finger, and the carousel shows the image
4 selected; the selectedIndex is 4.
These functions help components work consistently with fractional selection.
