Check if a point lies inside a rectangle
| 45 | |
| 46 | // Check if a point lies inside a rectangle |
| 47 | bool PointInRect(rect_t rect, vector2i_t point){ |
| 48 | return (point.x >= rect.pos.x && point.x < rect.pos.x + rect.size.x && point.y >= rect.pos.y && point.y < rect.pos.y + rect.size.y); |
| 49 | } |
| 50 | |
| 51 | rgba_colour_t AverageColour(rgba_colour_t c1, rgba_colour_t c2){ |
| 52 | int r = static_cast<int>(c1.r) + c2.r; |
no outgoing calls
no test coverage detected