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.cpp | 4 ++-- Runtime/Math/Vector2.h | 49 +++++++++++++++++++++++++----------------------- 2 files changed, 28 insertions(+), 25 deletions(-) (limited to 'Runtime/Math') diff --git a/Runtime/Math/Vector2.cpp b/Runtime/Math/Vector2.cpp index 2b70b24..185e66f 100644 --- a/Runtime/Math/Vector2.cpp +++ b/Runtime/Math/Vector2.cpp @@ -1,4 +1,4 @@ #include "Vector2.h" -Vector2 Vector2::one = Vector2(1, 1); -Vector2 Vector2::zero = Vector2(0, 0); +Internal::Vector2 Internal::Vector2::one = Internal::Vector2(1, 1); +Internal::Vector2 Internal::Vector2::zero = Internal::Vector2(0, 0); 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