OSDN Git Service

Merge pull request #3569 from sikabane-works/release/3.0.0.88-alpha
[hengbandforosx/hengbandosx.git] / src / util / point-2d.h
1 #pragma once
2
3 #include "system/h-type.h"
4
5 /**
6  * @brief 2次元平面上の座標を表す構造体
7  */
8 template <typename T>
9 struct Point2D {
10     T y{};
11     T x{};
12     constexpr Point2D(T y, T x)
13         : y(y)
14         , x(x)
15     {
16     }
17 };
18
19 //! ゲームの平面マップ上の座標位置を表す構造体
20 using Pos2D = Point2D<POSITION>;