diff --git a/gdnative/vector3i.cpp b/gdnative/vector3i.cpp index 085bd0d..3e3466a 100644 --- a/gdnative/vector3i.cpp +++ b/gdnative/vector3i.cpp @@ -115,7 +115,6 @@ pandemonium_vector3i GDAPI pandemonium_vector3i_clamp(const pandemonium_vector3i return dest; } - pandemonium_vector3i GDAPI pandemonium_vector3i_operator_add(const pandemonium_vector3i *p_self, const pandemonium_vector3i *p_b) { pandemonium_vector3i raw_dest; Vector3i *dest = (Vector3i *)&raw_dest; @@ -188,6 +187,13 @@ pandemonium_bool GDAPI pandemonium_vector3i_operator_less(const pandemonium_vect return *self < *b; } +pandemonium_vector3 GDAPI pandemonium_vector3i_to_vector3(const pandemonium_vector3i *p_self) { + pandemonium_vector3 dest; + const Vector3i *self = (const Vector3i *)p_self; + *((Vector3 *)&dest) = self->to_vector3(); + return dest; +} + pandemonium_string GDAPI pandemonium_vector3i_as_string(const pandemonium_vector3i *p_self) { pandemonium_string ret; const Vector3i *self = (const Vector3i *)p_self; diff --git a/include/gdn/vector3i.h b/include/gdn/vector3i.h index 741d51f..e79785f 100644 --- a/include/gdn/vector3i.h +++ b/include/gdn/vector3i.h @@ -101,6 +101,8 @@ pandemonium_vector3i GDAPI pandemonium_vector3i_operator_neg(const pandemonium_v pandemonium_bool GDAPI pandemonium_vector3i_operator_equal(const pandemonium_vector3i *p_self, const pandemonium_vector3i *p_b); pandemonium_bool GDAPI pandemonium_vector3i_operator_less(const pandemonium_vector3i *p_self, const pandemonium_vector3i *p_b); +pandemonium_vector3 GDAPI pandemonium_vector3i_to_vector3(const pandemonium_vector3i *p_self); + pandemonium_string GDAPI pandemonium_vector3i_as_string(const pandemonium_vector3i *p_self); void GDAPI pandemonium_vector3i_new(pandemonium_vector3i *r_dest, const pandemonium_int p_x, const pandemonium_int p_y, const pandemonium_int p_z);