From 8cbcd2dc3f7ea5a1d8656cd3885b553121cb7450 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 28 Oct 2021 10:39:31 +0800 Subject: *internal --- Runtime/Math/Vector2.h | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) (limited to 'Runtime/Math/Vector2.h') 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; + }; +} -- cgit v1.1-26-g67d0