Banjo API 0.0.1
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
18// Return 1 if segments [a0,a1] and [b0,b1] intersect, else 0.
20 const bj_vec2 a0,
21 const bj_vec2 a1,
22 const bj_vec2 b0,
23 const bj_vec2 b1
24);
25
27 const bj_vec2 c,
28 bj_real r,
29 const bj_vec2 l0,
30 const bj_vec2 l1
31);
32
33
37
38#endif /* BJ_GEOMETRY_2D_H */
General-purpose definitions for Banjo API.
#define BANJO_EXPORT
Definition api.h:139
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:276
bj_bool bj_check_circle_segment_hit(const bj_vec2 c, bj_real r, const bj_vec2 l0, const bj_vec2 l1)
bj_bool bj_check_segments_hit(const bj_vec2 a0, const bj_vec2 a1, const bj_vec2 b0, const bj_vec2 b1)
bj_real bj_vec2[2]
bj_vec2: 2D vector of bj_real values.
Definition vec.h:27
float bj_real
Selected real type for float configuration.
Definition math.h:51
vector manipulation API