summaryrefslogtreecommitdiffstats
path: root/ui/base/animation
diff options
context:
space:
mode:
Diffstat (limited to 'ui/base/animation')
-rw-r--r--ui/base/animation/tween.cc3
-rw-r--r--ui/base/animation/tween.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/ui/base/animation/tween.cc b/ui/base/animation/tween.cc
index c1e4a47..fa299c1 100644
--- a/ui/base/animation/tween.cc
+++ b/ui/base/animation/tween.cc
@@ -42,6 +42,9 @@ double Tween::CalculateValue(Tween::Type type, double state) {
case EASE_OUT:
return 1.0 - pow(1.0 - state, 2);
+ case SMOOTH_IN_OUT:
+ return sin(state);
+
case ZERO:
return 0;
}
diff --git a/ui/base/animation/tween.h b/ui/base/animation/tween.h
index b1641b5..829fa7d 100644
--- a/ui/base/animation/tween.h
+++ b/ui/base/animation/tween.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -22,6 +22,7 @@ class UI_EXPORT Tween {
EASE_IN_OUT, // Slow in and out, fast in the middle.
FAST_IN_OUT, // Fast in and out, slow in the middle.
EASE_OUT_SNAP, // Fast in, slow out, snap to final value.
+ SMOOTH_IN_OUT, // Smooth, consistent speeds in and out (sine wave).
ZERO, // Returns a value of 0 always.
};