← back to roto on ba3a.dev

frameIndexFor

fun frameIndexFor(index: Int, keyFrameCount: Int): Int

The index of the model frame shown with key frame index of keyFrameCount: the nearest to index * (n - 1) / (k - 1) for n model frames and k key frames, in exact integer arithmetic with halves rounded up. One key frame shows the first model frame.