aboutsummaryrefslogtreecommitdiff
path: root/src/common.c
blob: 74dcf44deb56a24ff5fb93e243841fda2dbfce5a (plain)
1
2
3
4
5
6
#include "../include/common.h"

bool mgui_rectangle_contains(mgl_vec2f rectangle_pos, mgl_vec2f rectangle_size, mgl_vec2f point) {
    return point.x >= rectangle_pos.x && point.x <= rectangle_pos.x + rectangle_size.x
        && point.y >= rectangle_pos.y && point.y <= rectangle_pos.y + rectangle_size.y;
}