| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/base/animation/tween.h" | 5 #include "ui/base/animation/tween.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <float.h> | 10 #include <float.h> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 return state; | 39 return state; |
| 40 | 40 |
| 41 case EASE_OUT_SNAP: | 41 case EASE_OUT_SNAP: |
| 42 state = 0.95 * (1.0 - pow(1.0 - state, 2)); | 42 state = 0.95 * (1.0 - pow(1.0 - state, 2)); |
| 43 return state; | 43 return state; |
| 44 | 44 |
| 45 case EASE_OUT: | 45 case EASE_OUT: |
| 46 return 1.0 - pow(1.0 - state, 2); | 46 return 1.0 - pow(1.0 - state, 2); |
| 47 | 47 |
| 48 case EASE_OUT_2: | 48 case EASE_OUT_2: |
| 49 return 1.0 - pow(1.0 - state, 3); |
| 50 |
| 51 case EASE_OUT_3: |
| 49 return 1.0 - pow(1.0 - state, 4); | 52 return 1.0 - pow(1.0 - state, 4); |
| 50 | 53 |
| 51 case SMOOTH_IN_OUT: | 54 case SMOOTH_IN_OUT: |
| 52 return sin(state); | 55 return sin(state); |
| 53 | 56 |
| 54 case ZERO: | 57 case ZERO: |
| 55 return 0; | 58 return 0; |
| 56 } | 59 } |
| 57 | 60 |
| 58 NOTREACHED(); | 61 NOTREACHED(); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 start_transform.matrix().get(row, col), | 130 start_transform.matrix().get(row, col), |
| 128 end_transform.matrix().get(row, col))); | 131 end_transform.matrix().get(row, col))); |
| 129 } | 132 } |
| 130 } | 133 } |
| 131 } | 134 } |
| 132 | 135 |
| 133 return to_return; | 136 return to_return; |
| 134 } | 137 } |
| 135 | 138 |
| 136 } // namespace ui | 139 } // namespace ui |
| OLD | NEW |