summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-08 11:33:43 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-08 11:33:43 -0500
commitabec84f7b2ee0f75c4622a6d4469dbf0c7eaf5ad (patch)
tree9cc6ccef1b897db7127f88a4de55c2f9b85c9535 /math.c
parentf7828a0718b730ffdc6b9f25e5d11cbfd666acf1 (diff)
find show number of matches
Diffstat (limited to 'math.c')
-rw-r--r--math.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/math.c b/math.c
index b833872..e6e90f3 100644
--- a/math.c
+++ b/math.c
@@ -657,6 +657,8 @@ static float rect_x1(Rect r) { return r.pos.x; }
static float rect_y1(Rect r) { return r.pos.y; }
static float rect_x2(Rect r) { return r.pos.x + r.size.x; }
static float rect_y2(Rect r) { return r.pos.y + r.size.y; }
+static float rect_xmid(Rect r) { return r.pos.x + r.size.x * 0.5f; }
+static float rect_ymid(Rect r) { return r.pos.y + r.size.y * 0.5f; }
static void rect_coords(Rect r, float *x1, float *y1, float *x2, float *y2) {
*x1 = r.pos.x;