Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
Vector2.hpp
1/*
2Copyright (C) 2018,2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17#ifndef AEONGAMES_VECTOR2_H
18#define AEONGAMES_VECTOR2_H
19
21
22namespace AeonGames
23{
25 class Vector2
26 {
27 public:
29 DLL Vector2();
33 DLL Vector2 ( const float* const aVector );
38 DLL Vector2 ( float aX, float aY );
40 DLL ~Vector2();
44 DLL const float* const GetVector() const;
48 DLL const float& GetX() const;
52 DLL const float& GetY() const;
53 protected:
54 float mVector[2];
55 };
56
61 DLL bool operator== ( const Vector2& aLhs, const Vector2& aRhs );
62}
63#endif
Platform-specific macros, includes, and DLL export/import definitions.
2D vector class.
Definition Vector2.hpp:26
DLL const float & GetX() const
Get the X component.
Definition Vector2.cpp:45
DLL const float & GetY() const
Get the Y component.
Definition Vector2.cpp:50
float mVector[2]
X and Y components.
Definition Vector2.hpp:54
DLL const float *const GetVector() const
Get a pointer to the internal vector data.
Definition Vector2.cpp:40
DLL Vector2()
Default constructor.
Definition Vector2.cpp:21
DLL ~Vector2()
destructor.
<- This is here just for the literals
Definition AABB.hpp:31
DLL const bool operator==(const Matrix3x3 &lhs, const Matrix3x3 &rhs)
Compare two 3x3 matrices for equality.