summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-28 12:08:36 -0500
committerpommicket <pommicket@gmail.com>2022-12-28 12:08:36 -0500
commit92e8db6a364b8d1c38f3c15b8e040f6fb7c564f0 (patch)
tree36339bd5be0ef47a4bc1e6383602d74af8fab496 /math.c
parent11df4f10197d67e5b61898bd98cdfccc1159dd26 (diff)
nice signature help (still needs work)
Diffstat (limited to 'math.c')
-rw-r--r--math.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/math.c b/math.c
index 80ef10e..dd1408d 100644
--- a/math.c
+++ b/math.c
@@ -687,6 +687,12 @@ static Rect rect4(float x1, float y1, float x2, float y2) {
return rect(V2(x1,y1), V2(x2-x1, y2-y1));
}
+static Rect rect_xywh(float x, float y, float w, float h) {
+ assert(w >= 0);
+ assert(h >= 0);
+ return rect(V2(x, y), V2(w, h));
+}
+
static Rect rect_centered(v2 center, v2 size) {
Rect r;
r.pos = v2_sub(center, v2_scale(size, 0.5f));