From 79efc8a8e9976bbdd41d4a47b58c71d3be9d4ff7 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Mon, 19 Dec 2022 16:42:15 +0100 Subject: zombie chunks --- src/math_helper.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/math_helper.c') 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) { -- cgit v1.2.3-70-g09d2