netatmo-algo/src/bounding_box.h

20 lines
287 B
C
Raw Permalink Normal View History

2022-02-12 00:28:54 +01:00
#pragma once
#include <cstdint>
2022-02-15 13:17:14 +01:00
namespace freling {
2022-02-12 00:28:54 +01:00
struct BoundingBox {
2022-02-15 21:18:50 +01:00
int32_t x;
int32_t y;
uint32_t width;
uint32_t height;
2022-02-14 00:13:09 +01:00
int area() const;
2022-02-16 19:16:17 +01:00
bool contains(int x, int y) const;
2022-02-14 00:13:09 +01:00
bool operator==(const BoundingBox& b) const;
2022-02-12 00:28:54 +01:00
};
2022-02-15 13:17:14 +01:00
} // namespace freling