Browse Source

Fixed quaternion array access #942

Christophe Riccio 6 years ago
parent
commit
4db8f89aac
1 changed files with 2 additions and 2 deletions
  1. 2 2
      glm/detail/type_quat.inl

+ 2 - 2
glm/detail/type_quat.inl

@@ -74,14 +74,14 @@ namespace detail
 	GLM_FUNC_QUALIFIER GLM_CONSTEXPR T & qua<T, Q>::operator[](typename qua<T, Q>::length_type i)
 	GLM_FUNC_QUALIFIER GLM_CONSTEXPR T & qua<T, Q>::operator[](typename qua<T, Q>::length_type i)
 	{
 	{
 		assert(i >= 0 && i < this->length());
 		assert(i >= 0 && i < this->length());
-		return (&w)[i];
+		return (&x)[i];
 	}
 	}
 
 
 	template<typename T, qualifier Q>
 	template<typename T, qualifier Q>
 	GLM_FUNC_QUALIFIER GLM_CONSTEXPR T const& qua<T, Q>::operator[](typename qua<T, Q>::length_type i) const
 	GLM_FUNC_QUALIFIER GLM_CONSTEXPR T const& qua<T, Q>::operator[](typename qua<T, Q>::length_type i) const
 	{
 	{
 		assert(i >= 0 && i < this->length());
 		assert(i >= 0 && i < this->length());
-		return (&w)[i];
+		return (&x)[i];
 	}
 	}
 
 
 	// -- Implicit basic constructors --
 	// -- Implicit basic constructors --