Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在研究我表弟给我的代码。在代码中有一个我不认识的符号。如果有人可以帮助识别并向我解释它,那就太棒了!
OBJECT_SIZE 是一个常量“>> 1”,我需要帮助理解的部分。
“OBJECT_SIZE>>1”
m_CenterPt = Point2F(middle.x - (OBJECT_SIZE>>1) - MIDOFFSET, middle.y - (OBJECT_SIZE>>1) - MIDOFFSET);
>>运算符是右移;将正数右移一位等效于整数除以二(出于相同的原因,为什么删除十进制数的最后一位等效于整数除以十)。
>>