The animation code base uses double to store its time values. We should instead be using TimeDeltas to avoid floating point precision and to make time unit conversions more clear.
This is a bit harder than just replacing double with TimeDelta it seems. We make extensive use of double's infinity and NaN values.
TimeDelta has Min() and Max() values that could serve as replacements but arithmetic will not function in the same way as for doubles potentially leading to bugs that are even harder to detect than unit mishandling.
One option could be to implement an AnimationTime class that wraps TimeDelta along with infinity and null states.
Comment 1 by alancutter@chromium.org
, Jun 29 2017Status: Available (was: Assigned)