diff options
| author | iamcheeseman <[email protected]> | 2026-05-13 21:24:21 -0400 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-05-13 21:24:21 -0400 |
| commit | 8d2793e9ef7cf7f742ec23e77c44ac21a624d01f (patch) | |
| tree | c8263278076d7c7fd575cfcf0dc35703e8dc426e /teensy/teensy_math.c | |
| parent | 13e6f3d8403f0fdbed4ead1d8eda4d9ed68ac080 (diff) | |
start ui
Diffstat (limited to 'teensy/teensy_math.c')
| -rw-r--r-- | teensy/teensy_math.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/teensy/teensy_math.c b/teensy/teensy_math.c new file mode 100644 index 0000000..79d89c1 --- /dev/null +++ b/teensy/teensy_math.c @@ -0,0 +1,19 @@ +#include "teensy.h" + +bool ty_pointi_in_recti(ty_Vec2i point, ty_Recti rect) +{ + return + point.x > rect.x && + point.x < rect.x + rect.w && + point.y > rect.y && + point.y < rect.y + rect.h; +} + +bool ty_point_in_rect(ty_Vec2 point, ty_Rect rect) +{ + return + point.x > rect.x && + point.x < rect.x + rect.w && + point.y > rect.y && + point.y < rect.y + rect.h; +} |
