我想知道如果& &運營商在級聯莊園工作。比較矩形碰撞檢查的下列實現。C++性能和操作員實例
inline bool RectInRect(RECT one,RECT two){
if(one.left < two.right)
if(one.right > two.left)
if(one.top < two.bottom)
if(one.bottom > two.top)
return true;
return false;
}
inline bool RectInRect(RECT one,RECT two){
return (one.left < two.right && one.right > two.left &&
one.top < two.bottom && one.bottom > two.top);
}
這兩者是相同的還是最高的一個操作更快?
[**級聯莊園**](http://www.wright-house.com/frank-lloyd-wright/fallingwater-pictures/F1SW-fallingwater-in-fall.html) – 2012-02-26 10:19:14
看起來很可愛。 – user936509 2012-02-26 10:20:19