MovingBlocks/TeraMath — pull request #20 by msteiger (2014-08-10 07:47:13+00:00)
Title: Some geometric shapes

A few geometry classes that I currently use. At least two points are worth mentioning:

* The class constructors reuse the Vector2d parameters directly instead of creating copies.
* Rect2d is almost identical to engine's Rect2f. The contains() methods return true for x+w and y+h which is consistent with Rect2f, but is imho wrong. The right and bottom edges should the first ones to be outside, otherwise these points are inside two contiguous rectangles. This become even more of a problem for integer-based implementations. Some libs provide a method "touches" to catch these borderline cases.