diff options
author | chai <chaifix@163.com> | 2021-10-28 10:39:31 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-28 10:39:31 +0800 |
commit | 8cbcd2dc3f7ea5a1d8656cd3885b553121cb7450 (patch) | |
tree | 216433c4e919ecac921e0d1eb3a96e19fc4fd032 /Runtime/Math/Vector2.h | |
parent | d162d7711177c414e5ea9a3876dc6fa3414c937e (diff) |
*internal
Diffstat (limited to 'Runtime/Math/Vector2.h')
-rw-r--r-- | Runtime/Math/Vector2.h | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/Runtime/Math/Vector2.h b/Runtime/Math/Vector2.h index 5fb230c..27cf312 100644 --- a/Runtime/Math/Vector2.h +++ b/Runtime/Math/Vector2.h @@ -1,30 +1,33 @@ #pragma once -struct Vector2 +namespace Internal { - Vector2(float x=0, float y = 0) - { - this->x = x; - this->y = y; - } - inline void Set(float x, float y) - { - this->x = x; - this->y = y; - } + struct Vector2 + { + Vector2(float x = 0, float y = 0) + { + this->x = x; + this->y = y; + } + inline void Set(float x, float y) + { + this->x = x; + this->y = y; + } - bool operator == (const Vector2& v) const - { - return v.x == x && v.y == y; - } + bool operator == (const Vector2& v) const + { + return v.x == x && v.y == y; + } - bool operator != (const Vector2& v) const - { - return v.x != x || v.y != y; - } + bool operator != (const Vector2& v) const + { + return v.x != x || v.y != y; + } - float x, y; + float x, y; - static Vector2 zero; - static Vector2 one; -};
\ No newline at end of file + static Vector2 zero; + static Vector2 one; + }; +} |