diff options
Diffstat (limited to 'game/addons/zylann.hterrain/native/src/vector2i.h')
-rw-r--r-- | game/addons/zylann.hterrain/native/src/vector2i.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/game/addons/zylann.hterrain/native/src/vector2i.h b/game/addons/zylann.hterrain/native/src/vector2i.h new file mode 100644 index 0000000..3eb60d6 --- /dev/null +++ b/game/addons/zylann.hterrain/native/src/vector2i.h @@ -0,0 +1,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 |