]> git.lizzy.rs Git - nothing.git/blobdiff - src/math/rect.h
Merge pull request #924 from RIscRIpt/manual_sdl2
[nothing.git] / src / math / rect.h
index 8cea436152f8af74afbd60e707b98ccadb4e9105..9b045b5cc5d5bcafd43cb19f1cd1abcebb8f6010 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef RECT_H_
 #define RECT_H_
 
-#include <SDL2/SDL.h>
+#include <SDL.h>
 
 #include "math/point.h"
 
@@ -25,6 +25,7 @@ typedef struct Line {
 
 Rect rect(float x, float y, float w, float h);
 Rect rect_from_vecs(Point position, Vec size);
+Rect rect_from_points(Point p1, Point p2);
 Rect rect_from_sdl(const SDL_Rect *rect);
 
 Rect rects_overlap_area(Rect rect1, Rect rect2);
@@ -47,7 +48,7 @@ SDL_Rect rect_for_sdl(Rect rect);
 
 Vec rect_center(Rect rect);
 
-Rect rect_snap(Rect pivot, Rect rect);
+Vec rect_snap(Rect pivot, Rect *rect);
 Vec rect_impulse(Rect *r1, Rect *r2);
 
 #endif  // RECT_H_