Provides some useful 2d geometry functions.
Why the name? Not sure. Duck Duck Goose.
If we repel too close, because of the inverse square we might get overlow problems.
Describes if a ray hit a rectangle.
Describes a cardinal direction..
Passed to gravitate.
Passed to repel
Returns which cardinal direction the specified rectangle is closest to.
If the point is outisde the rectangle, returns the squared distance from a point to a rectangle. If the point is insert the rectangle, it will return None.
Returns the squared distances between two points.
Returns the force to be exerted to the first object. The force to the second object can be retrieved simply by negating the first.
Repel two objects.
Repel one object by simply not calling add_force on the other.
Wraps the first point around the rectangle made between (0,0) and dim.