Returns the index of the time grid closest to a target time.
Time array.
Target time.
const result = Chalkboard.diff.closestIndex([0, 0.5, 1, 1.5], 0.9); // Returns 2 Copy
const result = Chalkboard.diff.closestIndex([0, 0.5, 1, 1.5], 0.9); // Returns 2
Returns the index of the time grid closest to a target time.