diff options
author | John Reck <jreck@google.com> | 2014-05-09 19:21:04 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2014-05-12 14:41:06 -0700 |
commit | 315c329544d7c593d1072b071cbb92d9afe74021 (patch) | |
tree | b10fccc58bfb0267c049fd49d6a56dfc25c6ec23 /libs/hwui/utils | |
parent | a9c47626975181261a409d029d24d9c893bc4717 (diff) | |
download | frameworks_base-315c329544d7c593d1072b071cbb92d9afe74021.zip frameworks_base-315c329544d7c593d1072b071cbb92d9afe74021.tar.gz frameworks_base-315c329544d7c593d1072b071cbb92d9afe74021.tar.bz2 |
Add TimeInterpolator support to RNA
Bug: 14678626
Change-Id: I6554e7fcd42c49fac3618ca792083bb68e358f55
Diffstat (limited to 'libs/hwui/utils')
-rw-r--r-- | libs/hwui/utils/MathUtils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/utils/MathUtils.h b/libs/hwui/utils/MathUtils.h index 8ba44dc..1a7082b 100644 --- a/libs/hwui/utils/MathUtils.h +++ b/libs/hwui/utils/MathUtils.h @@ -33,6 +33,14 @@ public: inline static bool isPositive(float value) { return value >= gNonZeroEpsilon; } + + inline static int min(int a, int b) { + return a < b ? a : b; + } + + inline static float lerp(float v1, float v2, float t) { + return v1 + ((v2 - v1) * t); + } }; // class MathUtils } /* namespace uirenderer */ |