summaryrefslogtreecommitdiff
path: root/Runtime/Math/Vector2.h
blob: 27cf3124abed661e99c6f9dc049da5a54a8f30bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once

namespace Internal
{
    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;
        }

        float x, y;

        static Vector2 zero;
        static Vector2 one;
    };
}