Add missing Vector2::operator Vector2i()
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user