aboutsummaryrefslogtreecommitdiff
path: root/game/addons/zylann.hterrain/native/src/vector2i.h
blob: 3eb60d67885b52a61f8ebc8b175238054ce91cc1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef VECTOR2I_H
#define VECTOR2I_H

#include <core/Vector2.hpp>

struct Vector2i {
    int x;
    int y;

    Vector2i(godot::Vector2 v) :
            x(static_cast<int>(v.x)),
            y(static_cast<int>(v.y)) {}

    bool any_zero() const {
        return x == 0 || y == 0;
    }
};

#endif // VECTOR2I_H