Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Unified Diff: sky/sdk/lib/animation/generators.dart

Issue 1211603003: Baby steps towards an odeon-like animation system. First victim: Drawer. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: abarth Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/lib/animation/animation_performance.dart ('k') | sky/sdk/lib/base/lerp.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/animation/generators.dart
diff --git a/sky/sdk/lib/animation/generators.dart b/sky/sdk/lib/animation/generators.dart
index 60e3f90c63211e1fa4298465351d86d01aaea5be..48690407e7442edbacdc0278ce2bc78b8305527e 100644
--- a/sky/sdk/lib/animation/generators.dart
+++ b/sky/sdk/lib/animation/generators.dart
@@ -89,7 +89,7 @@ class AnimationGenerator extends Generator {
startTime = timeStamp;
double t = (timeStamp - (startTime + initialDelay)) / duration;
- _lastTime = math.max(0.0, math.min(t, 1.0));
+ _lastTime = t.clamp(0.0, 1.0);
return _lastTime;
})
.takeWhile(_checkForCompletion)
« no previous file with comments | « sky/sdk/lib/animation/animation_performance.dart ('k') | sky/sdk/lib/base/lerp.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698