diff options
| author | Zhehang Ding <zhehangd@gmail.com> | 2022-02-07 01:21:36 -0800 |
|---|---|---|
| committer | Zhehang Ding <zhehangd@gmail.com> | 2022-02-07 01:23:18 -0800 |
| commit | df0e28fe43ae40efe13df1dacc8f2fc617cc1e4c (patch) | |
| tree | fd4baacee675480755a6d96ff917920571558b7e /src/variant | |
| parent | 24c94e4af0399f7a1f39738942a0b24adde39db6 (diff) | |
| download | redot-cpp-df0e28fe43ae40efe13df1dacc8f2fc617cc1e4c.tar.gz | |
Add missing Vector2::operator Vector2i()
Diffstat (limited to 'src/variant')
| -rw-r--r-- | src/variant/vector2.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/variant/vector2.cpp b/src/variant/vector2.cpp index 3cc9fda..7ba0910 100644 --- a/src/variant/vector2.cpp +++ b/src/variant/vector2.cpp @@ -31,6 +31,7 @@ #include <godot_cpp/core/error_macros.hpp> #include <godot_cpp/variant/string.hpp> #include <godot_cpp/variant/vector2.hpp> +#include <godot_cpp/variant/vector2i.hpp> namespace godot { @@ -38,6 +39,10 @@ Vector2::operator String() const { return String::num(x, 5) + ", " + String::num(y, 5); } +Vector2::operator Vector2i() const { + return Vector2i(x, y); +} + real_t Vector2::angle() const { return Math::atan2(y, x); } |
