From f2ac32341d802f87100d2bb233a09074760c0f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 6 Aug 2012 21:38:37 +0200 Subject: [PATCH] Fixed massive bugs in Vector3 and Vector4. "These functions are so simple that no unit test is needed." --- src/Math/Vector3.h | 2 +- src/Math/Vector4.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Math/Vector3.h b/src/Math/Vector3.h index 30072d7f5..2d43ef63b 100644 --- a/src/Math/Vector3.h +++ b/src/Math/Vector3.h @@ -87,7 +87,7 @@ template class Vector3: public Vector<3, T> { inline constexpr Vector2 xy() const { return Vector2::from(Vector<3, T>::data()); } inline constexpr T r() const { return x(); } /**< @brief R component */ - inline constexpr T g() const { return x(); } /**< @brief G component */ + inline constexpr T g() const { return y(); } /**< @brief G component */ inline constexpr T b() const { return z(); } /**< @brief B component */ inline void setR(T value) { setX(value); } /**< @brief Set R component */ diff --git a/src/Math/Vector4.h b/src/Math/Vector4.h index c406ef19b..430b80de0 100644 --- a/src/Math/Vector4.h +++ b/src/Math/Vector4.h @@ -91,7 +91,7 @@ template class Vector4: public Vector<4, T> { inline void setR(T value) { setX(value); } /**< @brief Set R component */ inline void setG(T value) { setY(value); } /**< @brief Set G component */ inline void setB(T value) { setZ(value); } /**< @brief Set B component */ - inline void setA(T value) { setA(value); } /**< @brief Set A component */ + inline void setA(T value) { setW(value); } /**< @brief Set A component */ /** * @brief RGB part of the vector