|
- #ifndef IZ_RECT_H
- #define IZ_RECT_H
-
- #include <stdbool.h>
- #include "IZ_point2d.h"
-
- typedef struct {
- IZ_Coordinate left;
- IZ_Coordinate top;
- IZ_Coordinate right;
- IZ_Coordinate bottom;
- } IZ_Bounds;
-
- typedef struct {
- // top left
- IZ_Point2D pos;
- IZ_Coordinate width;
- IZ_Coordinate height;
- } IZ_Rect;
-
- IZ_Bounds IZ_RectGetBounds(IZ_Rect);
-
- bool IZ_BoundsContainPoint(IZ_Bounds, IZ_Point2D);
-
- bool IZ_BoundsCollide(IZ_Bounds, IZ_Bounds);
-
- #endif
|