/libs/cocos2d/Support/ccUtils.c
C | 18 lines | 10 code | 1 blank | 7 comment | 0 complexity | fe22f1980a9e5cb413b6e8431a477249 MD5 | raw file
Possible License(s): Apache-2.0
1/* 2 * cocos2d for iPhone: http://www.cocos2d-iphone.org 3 * 4 */ 5 6/* 7 ccNextPOT function is licensed under the same license that is used in CCTexture2D.m. 8 */ 9unsigned int ccNextPOT(unsigned int x) 10{ 11 x = x - 1; 12 x = x | (x >> 1); 13 x = x | (x >> 2); 14 x = x | (x >> 4); 15 x = x | (x >> 8); 16 x = x | (x >>16); 17 return x + 1; 18}