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

Unified Diff: Source/core/animation/InterpolableValue.cpp

Issue 832873002: Animation: Remove ASSERT_NOT_REACHED from LengthStyleInterpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 12 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
Index: Source/core/animation/InterpolableValue.cpp
diff --git a/Source/core/animation/InterpolableValue.cpp b/Source/core/animation/InterpolableValue.cpp
index a8117c760698818c3d445aa0fa374c3a485ec456..41d4703249b248a14bf5b39f754c8edfe911487d 100644
--- a/Source/core/animation/InterpolableValue.cpp
+++ b/Source/core/animation/InterpolableValue.cpp
@@ -19,7 +19,7 @@ void InterpolableNumber::interpolate(const InterpolableValue &to, const double p
else if (progress == 1)
resultNumber.m_value = toNumber.m_value;
else
- resultNumber.m_value = m_value * (1 - progress) + toNumber.m_value * progress;
+ resultNumber.m_value = m_value + (toNumber.m_value - m_value) * progress;
}
void InterpolableBool::interpolate(const InterpolableValue &to, const double progress, InterpolableValue& result) const
« no previous file with comments | « no previous file | Source/core/animation/LengthStyleInterpolation.cpp » ('j') | Source/core/animation/LengthStyleInterpolation.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698