The question is: It seems that frames_per_second can be any value, whether it is a decimal or an integer, the effect of the animation will not change at all. This makes me full of doubts when using this function.
Theorically, a decimal number for a framerate is not a problem. For example for a 24 fps video you can often see in its properties : 23.98 as a frame rate. Also, if a frame is played every 30ms, the frame rate is 1000/30 == 33.33, there is no particular reason why it should exactly match a number of frames within a second.
Then the frame parameter actually ultimately affects time. In my example, from and to are both decimals. In fact, I don’t have to worry about why frames can be decimals. In fact, at the bottom level, from and to will be converted into time-related variables and then interpolated.
The above is the conclusion I came to after reading the relevant source code. In short, for novices, frameRate can be a decimal, but the fact that the frame parameter is a decimal is actually not easy to understand.