From 9ee98a06160ee2b234e92db70eb18e128fc76e5d Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Thu, 6 Jun 2019 16:31:25 +0900 Subject: add hubtbt --- include/mapbox/geometry/point_arithmetic.hpp | 119 --------------------------- 1 file changed, 119 deletions(-) delete mode 100644 include/mapbox/geometry/point_arithmetic.hpp (limited to 'include/mapbox/geometry/point_arithmetic.hpp') diff --git a/include/mapbox/geometry/point_arithmetic.hpp b/include/mapbox/geometry/point_arithmetic.hpp deleted file mode 100644 index 3940e5b..0000000 --- a/include/mapbox/geometry/point_arithmetic.hpp +++ /dev/null @@ -1,119 +0,0 @@ -#pragma once - -namespace mapbox { -namespace geometry { - -template -constexpr point operator+(point const& lhs, point const& rhs) -{ - return point(lhs.x + rhs.x, lhs.y + rhs.y); -} - -template -constexpr point operator+(point const& lhs, T const& rhs) -{ - return point(lhs.x + rhs, lhs.y + rhs); -} - -template -constexpr point operator-(point const& lhs, point const& rhs) -{ - return point(lhs.x - rhs.x, lhs.y - rhs.y); -} - -template -constexpr point operator-(point const& lhs, T const& rhs) -{ - return point(lhs.x - rhs, lhs.y - rhs); -} - -template -constexpr point operator*(point const& lhs, point const& rhs) -{ - return point(lhs.x * rhs.x, lhs.y * rhs.y); -} - -template -constexpr point operator*(point const& lhs, T const& rhs) -{ - return point(lhs.x * rhs, lhs.y * rhs); -} - -template -constexpr point operator/(point const& lhs, point const& rhs) -{ - return point(lhs.x / rhs.x, lhs.y / rhs.y); -} - -template -constexpr point operator/(point const& lhs, T const& rhs) -{ - return point(lhs.x / rhs, lhs.y / rhs); -} - -template -constexpr point& operator+=(point& lhs, point const& rhs) -{ - lhs.x += rhs.x; - lhs.y += rhs.y; - return lhs; -} - -template -constexpr point& operator+=(point& lhs, T const& rhs) -{ - lhs.x += rhs; - lhs.y += rhs; - return lhs; -} - -template -constexpr point& operator-=(point& lhs, point const& rhs) -{ - lhs.x -= rhs.x; - lhs.y -= rhs.y; - return lhs; -} - -template -constexpr point& operator-=(point& lhs, T const& rhs) -{ - lhs.x -= rhs; - lhs.y -= rhs; - return lhs; -} - -template -constexpr point& operator*=(point& lhs, point const& rhs) -{ - lhs.x *= rhs.x; - lhs.y *= rhs.y; - return lhs; -} - -template -constexpr point& operator*=(point& lhs, T const& rhs) -{ - lhs.x *= rhs; - lhs.y *= rhs; - return lhs; -} - -template -constexpr point& operator/=(point& lhs, point const& rhs) -{ - lhs.x /= rhs.x; - lhs.y /= rhs.y; - return lhs; -} - -template -constexpr point& operator/=(point& lhs, T const& rhs) -{ - lhs.x /= rhs; - lhs.y /= rhs; - return lhs; -} - -} // namespace geometry -} // namespace mapbox -- cgit 1.2.3-korg