timeToFraction

open fun timeToFraction(time: Float, duration: Float): Float

Get the fraction position at the elapsed time in seconds.

Return

The fractional (from 0 to 1) value at the specified time

Parameters

time

Elapsed time of interest in seconds.

duration

Duration in seconds