Fix integer vector mul/div operators and bindings.
* Vector2i and Vector3i mul/div by a float results in Vector2 and Vector3 respectively. * Create specializations to allow proper bindings. This fixes #44408 and supersedes #44441 and keeps the same rule of int <op> float returnig float, like with scalars.
This commit is contained in:
parent
fd0d2dcabf
commit
8c7268664d
9 changed files with 188 additions and 46 deletions
|
|
@ -343,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue