From 135c19b4337e1ab45cff40a306eadc52a061ddef Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 13 Aug 2012 22:18:03 +0300 Subject: add atlas textures support. --- src/utils/mathutils.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/utils/mathutils.h') diff --git a/src/utils/mathutils.h b/src/utils/mathutils.h index 7e43a3574..60f96729d 100644 --- a/src/utils/mathutils.h +++ b/src/utils/mathutils.h @@ -119,4 +119,12 @@ inline int roundDouble(const double v) return (v > 0.0) ? (v + 0.5) : (v - 0.5); } +inline int powerOfTwo(int input) +{ + int value = 1; + while (value < input) + value <<= 1; + return value; +} + #endif // UTILS_MATHUTILS_H -- cgit v1.2.3-70-g09d2