diff options
| author | iamcheeseman <[email protected]> | 2026-05-21 20:52:19 -0400 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-05-21 20:52:19 -0400 |
| commit | c2861def8f13c647bdd5c970ef7568d15821e0e2 (patch) | |
| tree | 9366c135550a2016e6df3d0d5d33f35774241bfa /teensy/teensy_renderer.c | |
| parent | bc5203f5a2e88aa6dd9f3ed54496d9813dfbc84e (diff) | |
clip all ui elements
Diffstat (limited to 'teensy/teensy_renderer.c')
| -rw-r--r-- | teensy/teensy_renderer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/teensy/teensy_renderer.c b/teensy/teensy_renderer.c index 5f6fced..564718a 100644 --- a/teensy/teensy_renderer.c +++ b/teensy/teensy_renderer.c @@ -45,8 +45,8 @@ void image_bounds_check(ty_Image img, ty_Vec2i pos) static ty_Vec2i clamp_point(ty_Vec2i p, ty_Recti rect) { - p.x = fmin(fmax(p.x, rect.x), rect.x + rect.w); - p.y = fmin(fmax(p.y, rect.y), rect.y + rect.h); + p.x = ty_clamp(p.x, rect.x, rect.x + rect.w); + p.y = ty_clamp(p.y, rect.y, rect.y + rect.h); return p; } |
