-
Notifications
You must be signed in to change notification settings - Fork 0
cDoubleRect
Stephen P edited this page Oct 13, 2021
·
4 revisions
Defines a rectangle in 2D space using double-typed x, y, width, and height variables.
double
The x-position of the rectangle.
double
The y-position of the rectangle.
double
The width (across the x-axis) of the rectangle.
double
The height (across the y-axis) of the rectangle.
bool quickCDoubleRectCollision(cDoubleRect rect1, cDoubleRect rect2)
Checks for a rectangle collision quickly, returning a simple boolean value, where true is that the objects are colliding, and false otherwise.
cDoubleVector checkCDoubleRectCollision(cDoubleRect rect1, cDoubleRect rect2)
Performs a rectangle collision check and returns the Minimum Translation Vector to apply to rect1 in order to fix the collision.