diff options
Diffstat (limited to 'libs/hwui/utils/MathUtils.h')
-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 */ |