**[Susan Lan]** *""Math.min" means = "stop at this time"?"*
No, Math.min takes multiple arguments (inputs) and returns (outputs) the smallest of them.

This code:

`t = Math.min(time + offset,10); // stop following after 10 seconds`

... says "Let t equal time-plus-offset, or let t equal 10, whichever is smaller.

So why does this stop at a given time? The next line of the expression:

`value + p.rotation.valueAtTime(t);`

... says, "Return the current value plus whatever the value of p.rotation was at time t. Since we've established a ceiling value for t (it can never be bigger than the constant 10 in the code above), we'll never look beyond the value at time 10 in this expression.

Walter Soyka

Designer & Mad Scientist at

Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting

@keenlive [twitter] |

RenderBreak [blog] |

Profile [LinkedIn]