| 37 | } |
| 38 | |
| 39 | void inertionalMoveFunction( |
| 40 | const IntCoord& _startRect, |
| 41 | const IntCoord& _destRect, |
| 42 | IntCoord& _result, |
| 43 | float _current_time) |
| 44 | { |
| 45 | #ifdef M_PI |
| 46 | #undef M_PI |
| 47 | #endif |
| 48 | const float M_PI = 3.141593f; |
| 49 | float k = std::sin(M_PI * _current_time - M_PI / 2.0f); |
| 50 | if (k < 0) |
| 51 | k = (-std::pow(-k, 0.7f) + 1) / 2; |
| 52 | else |
| 53 | k = (std::pow(k, 0.7f) + 1) / 2; |
| 54 | linearMoveFunction(_startRect, _destRect, _result, k); |
| 55 | } |
| 56 | |
| 57 | } // namespace MyGUI |
nothing calls this directly
no test coverage detected