diff options
author | chai <chaifix@163.com> | 2018-10-16 23:09:18 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-16 23:09:18 +0800 |
commit | 5534828032730762f8c1e4daf924b466fffb8be0 (patch) | |
tree | 1ae83fc877e4a2d136f6dd120260edd147b13e95 /src/libjin/Math/Vector2.hpp | |
parent | 0fc4b3ad5f2ac8d5c0588f61c0cbed4349ee1430 (diff) |
*格式化代码
Diffstat (limited to 'src/libjin/Math/Vector2.hpp')
-rw-r--r-- | src/libjin/Math/Vector2.hpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/libjin/Math/Vector2.hpp b/src/libjin/Math/Vector2.hpp index ddb8221..f0bbfc7 100644 --- a/src/libjin/Math/Vector2.hpp +++ b/src/libjin/Math/Vector2.hpp @@ -3,38 +3,38 @@ namespace jin { -namespace math -{ + namespace math + { - template<typename T> - class Vector2 - { - public: - Vector2() - { - data[0] = data[1] = 0; - } - Vector2(T _x, T _y) - { - data[0] = _x; - data[1] = _y; - } - Vector2(const Vector2<T>& v) - { - data[0] = v.data[0]; - data[1] = v.data[1]; - } + template<typename T> + class Vector2 + { + public: + Vector2() + { + data[0] = data[1] = 0; + } + Vector2(T _x, T _y) + { + data[0] = _x; + data[1] = _y; + } + Vector2(const Vector2<T>& v) + { + data[0] = v.data[0]; + data[1] = v.data[1]; + } - T &x = data[0], &y = data[1]; // xy - T &w = data[0], &h = data[1]; // wh - T &colum = data[0], &row = data[1]; // colum row + T &x = data[0], &y = data[1]; // xy + T &w = data[0], &h = data[1]; // wh + T &colum = data[0], &row = data[1]; // colum row - private: - T data[2]; + private: + T data[2]; - }; + }; -} // math + } // math } // jin #endif
\ No newline at end of file |