summaryrefslogtreecommitdiffstats
path: root/core/math/vector3.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/vector3.h')
-rw-r--r--core/math/vector3.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/math/vector3.h b/core/math/vector3.h
index d7a72b05a8..345329f7f3 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -35,9 +35,10 @@
#include "core/math/vector2.h"
#include "core/math/vector3i.h"
#include "core/string/ustring.h"
-class Basis;
-struct Vector3 {
+struct Basis;
+
+struct _NO_DISCARD_ Vector3 {
static const int AXIS_COUNT = 3;
enum Axis {
@@ -342,6 +343,9 @@ Vector3 &Vector3::operator*=(const real_t p_scalar) {
return *this;
}
+// Multiplication operators required to workaround issues with LLVM using implicit conversion
+// to Vector2i instead for integers where it should not.
+
_FORCE_INLINE_ Vector3 operator*(const float p_scalar, const Vector3 &p_vec) {
return p_vec * p_scalar;
}