2022-11-29 14:50:20 -07:00
|
|
|
#ifndef ARC_MATH_RECT_H_
|
|
|
|
|
#define ARC_MATH_RECT_H_
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
2023-01-30 23:22:34 -07:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-11-29 14:50:20 -07:00
|
|
|
typedef struct ARC_Rect {
|
|
|
|
|
int32_t x;
|
|
|
|
|
int32_t y;
|
|
|
|
|
int32_t w;
|
|
|
|
|
int32_t h;
|
|
|
|
|
} ARC_Rect;
|
|
|
|
|
|
|
|
|
|
typedef struct ARC_URect {
|
|
|
|
|
uint32_t x;
|
|
|
|
|
uint32_t y;
|
|
|
|
|
uint32_t w;
|
|
|
|
|
uint32_t h;
|
|
|
|
|
} ARC_URect;
|
|
|
|
|
|
2023-01-03 19:21:27 -07:00
|
|
|
int32_t ARC_Rect_Intersects(ARC_Rect *rect1, ARC_Rect *rect2);
|
|
|
|
|
|
|
|
|
|
int32_t ARC_Rect_LineIntersects(ARC_Rect *rect, int32_t *x1, int32_t *y1, int32_t *x2, int32_t *y2);
|
|
|
|
|
|
2023-01-30 23:22:34 -07:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-11-29 14:50:20 -07:00
|
|
|
#endif // ARC_MATH_POINT_H_
|