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

Unified Diff: ui/gfx/geometry/cubic_bezier.h

Issue 393713002: Scroll offset animation curve retargeting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove workaround. Created 6 years, 5 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 | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | ui/gfx/geometry/cubic_bezier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/geometry/cubic_bezier.h
diff --git a/ui/gfx/geometry/cubic_bezier.h b/ui/gfx/geometry/cubic_bezier.h
index 645dfb7106de68d0cf001a4175cb364c45b409b5..66d5e8a514012c623c3f8d9152599cd9e355183e 100644
--- a/ui/gfx/geometry/cubic_bezier.h
+++ b/ui/gfx/geometry/cubic_bezier.h
@@ -18,6 +18,9 @@ class GFX_EXPORT CubicBezier {
// Returns an approximation of y at the given x.
double Solve(double x) const;
+ // Returns an approximation of dy/dx at the given x.
+ double Slope(double x) const;
+
// Sets |min| and |max| to the bezier's minimum and maximium y values in the
// interval [0, 1].
void Range(double* min, double* max) const;
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | ui/gfx/geometry/cubic_bezier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698