Browse Source

Add missing Vector3::operator Vector3i

Zhehang Ding 3 years ago
parent
commit
24c94e4af0
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/variant/vector3.cpp

+ 5 - 0
src/variant/vector3.cpp

@@ -31,6 +31,7 @@
 #include <godot_cpp/core/error_macros.hpp>
 #include <godot_cpp/variant/basis.hpp>
 #include <godot_cpp/variant/vector3.hpp>
+#include <godot_cpp/variant/vector3i.hpp>
 
 namespace godot {
 
@@ -121,4 +122,8 @@ Vector3::operator String() const {
 	return (String::num(x, 5) + ", " + String::num(y, 5) + ", " + String::num(z, 5));
 }
 
+Vector3::operator Vector3i() const {
+	return Vector3i(x, y, z);
+}
+
 } // namespace godot