Banjo API 0.0.1
Multi-purpose C99 API
Loading...
Searching...
No Matches
rect.h
Go to the documentation of this file.
1
9#pragma once
10
11#include <banjo/api.h>
12
15typedef struct bj_rect_t bj_rect;
16
19struct bj_rect_t {
20 int16_t x;
21 int16_t y;
22 uint16_t w;
23 uint16_t h;
24};
25
51BANJO_EXPORT bj_bool bj_rect_intersect(
52 const bj_rect* p_rect_a,
53 const bj_rect* p_rect_b,
54 bj_rect* p_result
55);
56
58
General-purpose definitions for Banjo API.
uint16_t h
The height of the rectangle.
Definition rect.h:23
uint16_t w
The width of the rectangle.
Definition rect.h:22
int16_t x
The x-coordinate of the rectangle's top-left corner.
Definition rect.h:20
int16_t y
The y-coordinate of the rectangle's top-left corner.
Definition rect.h:21
struct bj_rect_t bj_rect
Typedef for bj_rect_t.
Definition rect.h:15
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.
Represents a rectangle with position and dimensions.
Definition rect.h:19