Banjo API 0.0.1
Multi-purpose C99 API
|
Data Structures | |
struct | bj_rect_t |
Represents a rectangle with position and dimensions. More... | |
Typedefs | |
typedef struct bj_rect_t | bj_rect |
Typedef for bj_rect_t. | |
Functions | |
bj_bool | bj_rect_intersect (const bj_rect *p_rect_a, const bj_rect *p_rect_b, bj_rect *p_result) |
Computes the intersection of two bj_rect. | |
struct bj_rect_t |
bj_bool bj_rect_intersect | ( | const bj_rect * | p_rect_a, |
const bj_rect * | p_rect_b, | ||
bj_rect * | p_result ) |
p_rect_a | Pointer to the first rectangle. Must not be 0. |
p_rect_b | Pointer to the second rectangle. Must not be 0. |
p_result | Pointer to the rectangle where the result will be stored. Can be 0 if only checking intersection presence. |
p_rect_a
or p_rect_b
is 0, the function returns 0. If p_result
is 0, the function only checks for intersection presence and does not compute the intersection rectangle.Example usage: