diff options
| author | iamcheeseman <[email protected]> | 2026-05-22 19:19:14 -0400 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-05-22 19:19:14 -0400 |
| commit | 77d193cdd127714ce4eab73d7a11a155655b7678 (patch) | |
| tree | 7e8f8cee1495206c4df2fe3d62ef9841e7eb81f8 /teensy/teensy_math.c | |
| parent | 2d5c6f38f73453e4b1185017ff01b02f095a5db0 (diff) | |
fix elements getting clipped with size <0
Diffstat (limited to 'teensy/teensy_math.c')
| -rw-r--r-- | teensy/teensy_math.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/teensy/teensy_math.c b/teensy/teensy_math.c index 9247bd0..18e95f4 100644 --- a/teensy/teensy_math.c +++ b/teensy/teensy_math.c @@ -24,7 +24,9 @@ ty_Recti ty_recti_shrink(ty_Recti rect, int p) rect.x += p; rect.y += p; rect.w -= p * 2; + rect.w = ty_max(rect.w, 0); rect.h -= p * 2; + rect.h = ty_max(rect.h, 0); return rect; } |
