diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-19 16:42:15 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-19 16:42:15 +0100 |
| commit | 79efc8a8e9976bbdd41d4a47b58c71d3be9d4ff7 (patch) | |
| tree | 5a46a8406ec3404859e0f3926bc75e08423afaa8 /src/math_helper.c | |
| parent | 22936e7a270a9bd0f13acb651b15db2158a8d6e0 (diff) | |
zombie chunks
Diffstat (limited to 'src/math_helper.c')
| -rw-r--r-- | src/math_helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/math_helper.c b/src/math_helper.c index 436c81b..6bb89e2 100644 --- a/src/math_helper.c +++ b/src/math_helper.c @@ -37,6 +37,9 @@ bool pos2(float p1, float p2) { return (p1 >= 0.0f && p2 >= 0.0f) || abs(p1-p2) < 1.0f; } +vec3f get_center_of_square(vec3f position, vec3f size) { + return (vec3f){position.x + size.x/2, position.y + size.y/2, position.z + size.z/2}; +} bool lines_intersect(vec2f p1, vec2f q1, vec2f p2, vec2f q2) { |
