aboutsummaryrefslogtreecommitdiff
path: root/teensy/teensy_math.c
blob: 79d89c1ff7f5ed30b2ea2a24c38366680e3555e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;
}