标签:style blog color os div log c++ size
1 Size UtilUI::m_size = Size(0, 0); 2 3 Vec2 UtilUI::m_origin = Vec2(0, 0); 4 5 6 7 Vec2 UtilUI::getPos(float xx, float yy) 8 9 { 10 11 if(UtilUI::m_size.width == 0)//如果这里没有设置的话,都是默认值0 12 13 { 14 15 UtilUI::m_origin = Director::getInstance()->getVisibleOrigin(); 16 17 UtilUI::m_size = Director::getInstance()->getVisibleSize(); 18 19 } 20 21 return Vec2(UtilUI::m_origin.x + UtilUI::m_size.width*xx, UtilUI::m_origin.y + UtilUI::m_size.height*yy); 22 23 }
clock()代表的是从程序开始运行,cpu滴答的次数,
CLOCKS_PER_SEC代表的是1秒内,cpu滴答的次数
标签:style blog color os div log c++ size
原文地址:http://www.cnblogs.com/say-one-say/p/3910745.html