Copy of geometry.hpp-0.9.0 (e3acceb)

This commit is contained in:
Eric Fischer
2016-12-07 14:11:53 -08:00
parent 89bfd27a8b
commit c0d5171f1d
13 changed files with 528 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#pragma once
namespace mapbox {
namespace geometry {
template <typename T>
struct point
{
using coordinate_type = T;
constexpr point()
: x(), y()
{}
constexpr point(T x_, T y_)
: x(x_), y(y_)
{}
T x;
T y;
};
template <typename T>
constexpr bool operator==(point<T> const& lhs, point<T> const& rhs)
{
return lhs.x == rhs.x && lhs.y == rhs.y;
}
template <typename T>
constexpr bool operator!=(point<T> const& lhs, point<T> const& rhs)
{
return !(lhs == rhs);
}
} // namespace geometry
} // namespace mapbox