From b6c1bfb5d01a26d8625c6656e47070a5111f382a Mon Sep 17 00:00:00 2001 From: Lynix Date: Sat, 16 Mar 2019 15:43:37 +0100 Subject: [PATCH] Math/Vector4: Fixed missing implementation --- ChangeLog.md | 1 + include/Nazara/Math/Vector4.inl | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 3894c28f3..8be3f7553 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -168,6 +168,7 @@ Nazara Engine: - Window::PushEvent is now public (useful for pushing external events ie. when using Qt or similar framework controlling window) - Fixed TileMap not rendering the right materials if it had no tile using some materials in-between - Added Vector[2|3|4](u)i64 typedefs +- Fixed missing static Vector4::DotProduct implementation Nazara Development Kit: - Added ImageWidget (#139) diff --git a/include/Nazara/Math/Vector4.inl b/include/Nazara/Math/Vector4.inl index 69d0b513f..8c602d214 100644 --- a/include/Nazara/Math/Vector4.inl +++ b/include/Nazara/Math/Vector4.inl @@ -899,6 +899,21 @@ namespace Nz return !operator<(vec); } + /*! + * \brief Calculates the dot (scalar) product with two vectors + * \return The value of the dot product + * + * \param vec1 The first vector to calculate the dot product with + * \param vec2 The second vector to calculate the dot product with + * + * \see AbsDotProduct, DotProduct + */ + template + T Vector4::DotProduct(const Vector4& vec1, const Vector4& vec2) + { + return vec1.DotProduct(vec2); + } + /*! * \brief Interpolates the vector to other one with a factor of interpolation * \return A new vector which is the interpolation of two vectors @@ -911,7 +926,6 @@ namespace Nz * * \see Lerp */ - template Vector4 Vector4::Lerp(const Vector4& from, const Vector4& to, T interpolation) {