diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-09-28 15:56:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 15:56:29 +0200 |
commit | b07f020c99545b756cf58c20e47f06bdf3247ef5 (patch) | |
tree | e1975a2718b1ee85d646a8bca356e2be56f03450 /core/math/quat.h | |
parent | bd12dc33d9991e69cc4cb9de187bca13d7108c58 (diff) | |
parent | e4942e4a96e6d53c6bf40c5602e29cd38595c2a9 (diff) |
Merge pull request #42133 from vnen/variant-op-consistency
Allow commutative multiplication in Variant
Diffstat (limited to 'core/math/quat.h')
-rw-r--r-- | core/math/quat.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/math/quat.h b/core/math/quat.h index 8619ea3c5c..3152b7d233 100644 --- a/core/math/quat.h +++ b/core/math/quat.h @@ -224,4 +224,8 @@ bool Quat::operator!=(const Quat &p_quat) const { return x != p_quat.x || y != p_quat.y || z != p_quat.z || w != p_quat.w; } +_FORCE_INLINE_ Quat operator*(const real_t &p_real, const Quat &p_quat) { + return p_quat * p_real; +} + #endif // QUAT_H |