summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-29 12:32:26 -0500
committerpommicket <pommicket@gmail.com>2022-12-29 12:32:26 -0500
commitf1e2e8382cc09bacb5da9e3c9463fea983a9e146 (patch)
tree1197682a7c1c01cc0067ccf3a6fe55bf0eb17ab8 /math.c
parent7dca1a04452ca6caf6e230839c48f0f9dd9d67b8 (diff)
more hover
Diffstat (limited to 'math.c')
-rw-r--r--math.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/math.c b/math.c
index dd1408d..db8e4f2 100644
--- a/math.c
+++ b/math.c
@@ -681,6 +681,13 @@ static Rect rect(v2 pos, v2 size) {
return r;
}
+static Rect rect_endpoints(v2 e1, v2 e2) {
+ Rect r;
+ r.pos = e1;
+ r.size = v2_sub(e2, e1);
+ return r;
+}
+
static Rect rect4(float x1, float y1, float x2, float y2) {
assert(x2 >= x1);
assert(y2 >= y1);