adjusted 3D modeling for walls
refactoring new helper classes / methods
This commit is contained in:
10
geo/Point2.h
10
geo/Point2.h
@@ -78,4 +78,14 @@ inline void swap(Point2& p1, Point2& p2) {
|
||||
std::swap(p1.y, p2.y);
|
||||
}
|
||||
|
||||
namespace std {
|
||||
template <> struct hash<Point2> {
|
||||
std::size_t operator()(const Point2& p) const {
|
||||
uint32_t x = *((uint32_t*)&(p.x));
|
||||
uint32_t y = *((uint32_t*)&(p.y));
|
||||
return std::hash<uint32_t>()(x^y);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // POINT2_H
|
||||
|
||||
Reference in New Issue
Block a user