summaryrefslogtreecommitdiff
path: root/src/utils/mathutils.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-13 22:18:03 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-30 02:57:13 +0300
commit135c19b4337e1ab45cff40a306eadc52a061ddef (patch)
tree0a163ca1edd542aec5570b7e451034aafb4089dd /src/utils/mathutils.h
parent3a2bab265768c219b0c077eef10b69dfe8158131 (diff)
downloadmv-135c19b4337e1ab45cff40a306eadc52a061ddef.tar.gz
mv-135c19b4337e1ab45cff40a306eadc52a061ddef.tar.bz2
mv-135c19b4337e1ab45cff40a306eadc52a061ddef.tar.xz
mv-135c19b4337e1ab45cff40a306eadc52a061ddef.zip
add atlas textures support.
Diffstat (limited to 'src/utils/mathutils.h')
-rw-r--r--src/utils/mathutils.h8
1 files changed, 8 insertions, 0 deletions
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