Showing results for February 18, 2004 - The Old New Thing

Feb 18, 2004
Post comments count0
Post likes count1

Why are RECTs endpoint-exclusive?

Raymond Chen
Raymond Chen

Endpoint-exclusive RECTs and lines are much easier to work with. For example, the width of a rectangle is , and its height is . If rectangles were endpoint-inclusive, then there would be annoying +1's everywhere. End-point exclusive rectangles also scale properly. For example, suppose you have two rectangles (0,0)-(100,100) and (100,100)-(200,20...

History