bsergent / overmorrow

Typescript canvas game engine
http://challengercity.com/v4/projects/overmorrow/
0 stars 1 forks source link

Rectangle class should never have negative width/height #33

Open bsergent opened 6 years ago

bsergent commented 6 years ago

Something needs to be done in the setters of x1, y1, x2, y2, width, and height to always ensure that x1,y1 is always the top-left and x2,y2 is always the lower-right. This will make iterating through Rectangles much easier, removing the need for Math.min() and Math.max().