Banjo API 1.1.0-alpha
Low-level C99 game development API
Loading...
Searching...
No Matches
geometry_2d.h
Go to the documentation of this file.
1
12#ifndef BJ_GEOMETRY_2D_H
13#define BJ_GEOMETRY_2D_H
14
15#include <banjo/api.h>
16#include <banjo/vec.h>
17
41 struct bj_vec2 a0,
42 struct bj_vec2 a1,
43 struct bj_vec2 b0,
44 struct bj_vec2 b1
45);
46
49 struct bj_vec2 a0,
50 struct bj_vec2 a1,
51 struct bj_vec2 b0,
52 struct bj_vec2 b1
53);
54
75 struct bj_vec2 c,
76 bj_real r,
77 struct bj_vec2 l0,
78 struct bj_vec2 l1
79);
80
83 struct bj_vec2 c,
84 bj_real r,
85 struct bj_vec2 l0,
86 struct bj_vec2 l1
87);
88
89
93
94#endif /* BJ_GEOMETRY_2D_H */
General-purpose definitions for Banjo API.
#define BANJO_EXPORT
Definition api.h:179
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:264
bj_bool bj_circle_hits_segment_2d(struct bj_vec2 c, bj_real r, struct bj_vec2 l0, struct bj_vec2 l1)
Tell whether a circle overlaps a line segment.
bj_bool bj_check_circle_segment_hit(struct bj_vec2 c, bj_real r, struct bj_vec2 l0, struct bj_vec2 l1)
bj_bool bj_check_segments_hit(struct bj_vec2 a0, struct bj_vec2 a1, struct bj_vec2 b0, struct bj_vec2 b1)
bj_bool bj_segment_hits_segment_2d(struct bj_vec2 a0, struct bj_vec2 a1, struct bj_vec2 b0, struct bj_vec2 b1)
Tell whether two line segments cross.
float bj_real
Selected real type for float configuration.
Definition math.h:80
2D vector of bj_real components.
Definition vec.h:57
Fixed-size vector types (2D, 3D, 4D) and inline operations.