From 84ad096896e9948c722a957d07ed6868e252a9f7 Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Thu, 29 Aug 2024 17:00:11 +0200 Subject: Initial commit --- main.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 main.c (limited to 'main.c') diff --git a/main.c b/main.c new file mode 100644 index 0000000..535a0b4 --- /dev/null +++ b/main.c @@ -0,0 +1,30 @@ +#include +#include +#include "includes/point.h" +#include "includes/rect.h" + +int main(int argc, char** argv) { + Point point = Point_alloc(); + Point_init(point, 0, 0); + Rect rect = Rect_alloc(); + Rect_init(rect, 4, 5, 120, 90); + + char buffer [64]; + + Rect_toString(rect, buffer); + printf("Rect: %s\n", buffer); + printf(" right = %i, bottom = %i\n", Rect_right_get(rect), Rect_bottom_get(rect)); + + Point_toString(point, buffer); + printf("Point (1): %s\n", buffer); + + Point_init(point, 25, -3.5f); + + Point_toString(point, buffer); + printf("Point (2): %s\n", buffer); + + free(point); + free(rect); + + return 0; +} -- cgit v1.2.3