Added support for lerpDuration()#64668
Conversation
|
@cbracken I moved the @Hixie I placed WRT to the tests, are there specific edge-case values that you believe are important here? I know you mentioned large numbers, infinity, and NaN WRT to |
|
This all looks great. Durations can't be NaN or Infinity so no worries there. Supporting non-null only seems fine, it's not clear what a null Duration would mean. basic_types.dart seems fine. |
| return Duration( | ||
| microseconds: (a.inMicroseconds + (b.inMicroseconds - a.inMicroseconds) * t).round(), | ||
| ); | ||
| } No newline at end of file |
There was a problem hiding this comment.
Here and below: Very minor nit, source files should end with a linefeed. That said, that's probably more pedantic than anything -- I'm 99% certain that the entire Dart toolchain consistently handles this just fine without it. But not a bad idea anyway.


Adds the ability to linearly interpolate Durations.