diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-06 16:40:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-06 16:40:59 +0100 |
commit | e38df41de8f20516ab8b2c91bedb4388cd9e41aa (patch) | |
tree | b3823839f7d1ba31b3e118d5585de0233146a1a9 /core/math/vector3i.h | |
parent | 762a31169d5e0939fda5bdaab537cec5ab39f870 (diff) | |
parent | 8c7268664da7ef98f802ec90fa2ba17b4d695847 (diff) |
Merge pull request #57607 from reduz/fix-variant-vec-integer-float-mul-div
Diffstat (limited to 'core/math/vector3i.h')
-rw-r--r-- | core/math/vector3i.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/math/vector3i.h b/core/math/vector3i.h index 1564ee9173..d166de80aa 100644 --- a/core/math/vector3i.h +++ b/core/math/vector3i.h @@ -194,6 +194,12 @@ Vector3i &Vector3i::operator*=(const int32_t p_scalar) { return *this; } +Vector3i Vector3i::operator*(const int32_t p_scalar) const { + return Vector3i(x * p_scalar, y * p_scalar, z * p_scalar); +} + +// Multiplication operators required to workaround issues with LLVM using implicit conversion. + _FORCE_INLINE_ Vector3i operator*(const int32_t p_scalar, const Vector3i &p_vector) { return p_vector * p_scalar; } @@ -210,10 +216,6 @@ _FORCE_INLINE_ Vector3i operator*(const double p_scalar, const Vector3i &p_vecto return p_vector * p_scalar; } -Vector3i Vector3i::operator*(const int32_t p_scalar) const { - return Vector3i(x * p_scalar, y * p_scalar, z * p_scalar); -} - Vector3i &Vector3i::operator/=(const int32_t p_scalar) { x /= p_scalar; y /= p_scalar; |