hi, i have a mathematical problem which is a bit hard to describe, but i'll give it a try anyway.
in a timeline, i have a number of frames, of which i want to skip a certain number of frames, which should be evenly distributed along the timeline.
for example i have 10 frames and i want to skip 5, then the solution is easy: we skip every second frame. 10/5 = 2
if (frame%2 == 0)
skip();
but what if the above division does result in a floating number?
for example in 44 frames i want to skip 15 times. how can i determine the 15 frames which should be skipped?
bascially i am looking for an algorithm that distributes that 15 frames as evenly as possible along the 44 frames. it will probably look like something like skipping after 2 and then after 3 frames alternately.
thanks!