Banjo API 0.0.1
C99 game development API
Loading...
Searching...
No Matches
rect.h
Go to the documentation of this file.
1
8#ifndef BJ_RECT_H
9#define BJ_RECT_H
10
11#include <banjo/api.h>
12
15struct bj_rect;
16
19struct bj_rect {
20 int16_t x;
21 int16_t y;
22 uint16_t w;
23 uint16_t h;
24};
25
52 const struct bj_rect* rect_a,
53 const struct bj_rect* rect_b,
54 struct bj_rect* result
55);
56
57#endif
58
60
General-purpose definitions for Banjo API.
#define BANJO_EXPORT
Definition api.h:155
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:249
uint16_t w
The width of the rectangle.
Definition rect.h:22
uint16_t h
The height of the rectangle.
Definition rect.h:23
int16_t y
The y-coordinate of the rectangle's top-left corner.
Definition rect.h:21
int16_t x
The x-coordinate of the rectangle's top-left corner.
Definition rect.h:20
bj_bool bj_rect_intersection(const struct bj_rect *rect_a, const struct bj_rect *rect_b, struct bj_rect *result)
Computes the intersection of two bj_rect.
Represents a rectangle with position and dimensions.
Definition rect.h:19