OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "CCPageScaleAnimation.h" | 7 #include "CCPageScaleAnimation.h" |
8 | 8 |
9 #include "FloatRect.h" | 9 #include "FloatRect.h" |
10 #include "FloatSize.h" | 10 #include "FloatSize.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // example, if we zoom from 0.5 to 4.0 in 3 seconds, then we should | 150 // example, if we zoom from 0.5 to 4.0 in 3 seconds, then we should |
151 // be zooming by 2x every second. | 151 // be zooming by 2x every second. |
152 float diff = m_pageScaleEnd / m_pageScaleStart; | 152 float diff = m_pageScaleEnd / m_pageScaleStart; |
153 float logDiff = log(diff); | 153 float logDiff = log(diff); |
154 logDiff *= ratio; | 154 logDiff *= ratio; |
155 diff = exp(logDiff); | 155 diff = exp(logDiff); |
156 return m_pageScaleStart * diff; | 156 return m_pageScaleStart * diff; |
157 } | 157 } |
158 | 158 |
159 } // namespace cc | 159 } // namespace cc |
OLD | NEW |