16 lines
342 B
C
16 lines
342 B
C
struct Rect {
|
|
f32 x; f32 y; f32 w; f32 h;
|
|
};
|
|
|
|
force_inline bool operator==(const Rect& a, const Rect& b) {
|
|
return a.x == b.x && a.y == b.y && a.w == b.w && a.h == b.h;
|
|
}
|
|
|
|
Rect make_rect_int (s64 x, s64 y, s64 w, s64 h) {
|
|
return {(f32)x, (f32)y, (f32)w, (f32)h};
|
|
}
|
|
|
|
Rect make_rect (f32 x, f32 y, f32 w, f32 h) {
|
|
return {x, y, w, h};
|
|
}
|