summaryrefslogtreecommitdiff
path: root/src/math_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math_helper.c')
-rw-r--r--src/math_helper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/math_helper.c b/src/math_helper.c
index 900b8aa..cb38861 100644
--- a/src/math_helper.c
+++ b/src/math_helper.c
@@ -108,6 +108,10 @@ box get_box_of_square(vec3f position, vec3f size) {
return (box){rendertl, rendertr, renderbl, renderbr, rendertl, rendertr, renderbl, renderbr};
}
+bool vec3f_equals(vec3f p1, vec3f p2) {
+ return p1.x == p2.x && p1.y == p2.y && p1.z == p2.z;
+}
+
box get_render_box_of_square_without_incline(platform_window* window, vec3f position, vec3f size) {
map_info info = get_map_info(window);
float render_x = (info.tile_width * position.x);