| Index: chrome/browser/android/vr_shell/easing.cc
|
| diff --git a/chrome/browser/android/vr_shell/easing.cc b/chrome/browser/android/vr_shell/easing.cc
|
| index 8138c6dd1f51f4e53d6cf1bb671ae35aee870411..39188b62906879aac47c9283aceca3d1d1c0ca0e 100644
|
| --- a/chrome/browser/android/vr_shell/easing.cc
|
| +++ b/chrome/browser/android/vr_shell/easing.cc
|
| @@ -33,6 +33,15 @@ double EaseOut::CalculateValueImpl(double state) {
|
| return 1.0 - pow(1.0 - state, power_);
|
| }
|
|
|
| +EaseInOut::EaseInOut(double power) : ease_in_(power), ease_out_(power) {}
|
| +double EaseInOut::CalculateValueImpl(double state) {
|
| + if (state < 0.5) {
|
| + return ease_in_.CalculateValueImpl(state * 2) / 2;
|
| + } else {
|
| + return ease_out_.CalculateValueImpl((state - 0.5) * 2) / 2 + 0.5;
|
| + }
|
| +}
|
| +
|
| double Linear::CalculateValueImpl(double state) {
|
| return state;
|
| }
|
|
|