From 2c52f1646480506d6647ec71e6ea14935caf2e7e Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Mon, 29 Nov 2021 11:13:31 -0600 Subject: Add length and length_squared to Vector2i/3i --- core/variant/variant_call.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/variant/variant_call.cpp') diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 64522a9908..ecf5009fb6 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1513,6 +1513,8 @@ static void _register_variant_builtin_methods() { bind_method(Vector2i, aspect, sarray(), varray()); bind_method(Vector2i, max_axis_index, sarray(), varray()); bind_method(Vector2i, min_axis_index, sarray(), varray()); + bind_method(Vector2i, length, sarray(), varray()); + bind_method(Vector2i, length_squared, sarray(), varray()); bind_method(Vector2i, sign, sarray(), varray()); bind_method(Vector2i, abs, sarray(), varray()); bind_method(Vector2i, clamp, sarray("min", "max"), varray()); @@ -1594,6 +1596,8 @@ static void _register_variant_builtin_methods() { bind_method(Vector3i, min_axis_index, sarray(), varray()); bind_method(Vector3i, max_axis_index, sarray(), varray()); + bind_method(Vector3i, length, sarray(), varray()); + bind_method(Vector3i, length_squared, sarray(), varray()); bind_method(Vector3i, sign, sarray(), varray()); bind_method(Vector3i, abs, sarray(), varray()); bind_method(Vector3i, clamp, sarray("min", "max"), varray()); -- cgit v1.2.3