> >
2つの長方形の重なり判定
ビル・ゲイツの面接試験ー私の場合
2つの長方形の重なり判定をする必要があったので、Googleで検索したところ、上記のエントリに行き着く。
結局、長方形A(LeftA, TopA, RightA, BottomA)、長方形B(LeftB, TopB, RightB, BottomB)という座標の時、
(LeftA < RightB) && (LeftB < RightA) && (BottomA < TopB) && (BottomB < TopA)
としたんだけど、もっと良い策はあるでしょうか。
それぐらい自分で考えろ、と言われると、おっしゃるとおりでございます、としか言いようがない。
Posted: 土 - 8月 19, 2006 at 07:03 午前
Quick Links
Blog -
Category -
Calendar
日
月
火
水
木
金
土
Categories
Archives
Browse archives by date
RSS & Bookmark
XML Feed
Bookmark
Statistics
Total entries in this blog:
Total entries in this category: 88
Published On: 10月 24, 2009 11:10 午前
Powered by
iBlog
©