|
Banjo API 0.0.1
C99 game development API
|

Functions | |
| 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_check_circle_segment_hit (struct bj_vec2 c, bj_real r, struct bj_vec2 l0, struct bj_vec2 l1) |
2D Geometry utilities
| bj_bool bj_check_circle_segment_hit | ( | struct bj_vec2 | c, |
| bj_real | r, | ||
| struct bj_vec2 | l0, | ||
| struct bj_vec2 | l1 ) |
Check if a circle intersects with a line segment.
Tests whether a circle centered at c with radius r intersects the line segment from l0 to l1.
| c | Circle center position. |
| r | Circle radius. |
| l0 | Start point of the line segment. |
| l1 | End point of the line segment. |
| bj_bool bj_check_segments_hit | ( | struct bj_vec2 | a0, |
| struct bj_vec2 | a1, | ||
| struct bj_vec2 | b0, | ||
| struct bj_vec2 | b1 ) |
Check if two line segments intersect.
Tests whether the line segment from a0 to a1 intersects with the segment from b0 to b1 in 2D space.
| a0 | Start point of first segment. |
| a1 | End point of first segment. |
| b0 | Start point of second segment. |
| b1 | End point of second segment. |