From 3ee947ced94ce24463838e0c587cb076ac81ec98 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 1 Jan 2023 23:03:25 -0500 Subject: move math.c functions to util.c --- ui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui.c') diff --git a/ui.c b/ui.c index a187d26..01e8b47 100644 --- a/ui.c +++ b/ui.c @@ -587,7 +587,7 @@ static void popup_get_rects(Ted const *ted, u32 options, Rect *popup, Rect *butt float button_height = 30; u16 nbuttons = util_popcount(options); float button_width = popup->size.x / nbuttons; - popup->size = v2_clamp(popup->size, v2_zero, V2(window_width, window_height)); + popup->size = v2_clamp(popup->size, V2(0, 0), V2(window_width, window_height)); Rect r = rect(V2(popup->pos.x, rect_y2(*popup) - button_height), V2(button_width, button_height)); if (options & POPUP_YES) { *button_yes = r; -- cgit v1.2.3