diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2022-09-24 18:19:55 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2022-10-21 17:54:49 -0500 |
commit | 7f9a8c99c93693023a96eb08afd3d9a723663279 (patch) | |
tree | 4842b94709e5ca15a4d73ca0b3da3b1ac753041a /core | |
parent | e73ff0e961da2b57f4ff63185c0929cc222c7372 (diff) |
Clean up Basis from Euler code
Diffstat (limited to 'core')
-rw-r--r-- | core/variant/variant_call.cpp | 4 | ||||
-rw-r--r-- | core/variant/variant_internal.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index ef4807ba71..688650f532 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1930,7 +1930,7 @@ static void _register_variant_builtin_methods() { bind_methodv(Basis, rotated, static_cast<Basis (Basis::*)(const Vector3 &, real_t) const>(&Basis::rotated), sarray("axis", "angle"), varray()); bind_method(Basis, scaled, sarray("scale"), varray()); bind_method(Basis, get_scale, sarray(), varray()); - bind_method(Basis, get_euler, sarray("order"), varray(Basis::EULER_ORDER_YXZ)); + bind_method(Basis, get_euler, sarray("order"), varray((int64_t)Basis::EULER_ORDER_YXZ)); bind_method(Basis, tdotx, sarray("with"), varray()); bind_method(Basis, tdoty, sarray("with"), varray()); bind_method(Basis, tdotz, sarray("with"), varray()); @@ -1940,7 +1940,7 @@ static void _register_variant_builtin_methods() { bind_method(Basis, get_rotation_quaternion, sarray(), varray()); bind_static_method(Basis, looking_at, sarray("target", "up"), varray(Vector3(0, 1, 0))); bind_static_method(Basis, from_scale, sarray("scale"), varray()); - bind_static_method(Basis, from_euler, sarray("euler", "order"), varray(Basis::EULER_ORDER_YXZ)); + bind_static_method(Basis, from_euler, sarray("euler", "order"), varray((int64_t)Basis::EULER_ORDER_YXZ)); /* AABB */ diff --git a/core/variant/variant_internal.h b/core/variant/variant_internal.h index 7ae2368fe4..636710c934 100644 --- a/core/variant/variant_internal.h +++ b/core/variant/variant_internal.h @@ -826,7 +826,7 @@ VARIANT_ACCESSOR_NUMBER(Projection::Planes) template <> struct VariantInternalAccessor<Basis::EulerOrder> { static _FORCE_INLINE_ Basis::EulerOrder get(const Variant *v) { return Basis::EulerOrder(*VariantInternal::get_int(v)); } - static _FORCE_INLINE_ void set(Variant *v, Basis::EulerOrder p_value) { *VariantInternal::get_int(v) = p_value; } + static _FORCE_INLINE_ void set(Variant *v, Basis::EulerOrder p_value) { *VariantInternal::get_int(v) = (int64_t)p_value; } }; template <> |