Jelajahi Sumber

Fixed reflect for scalars...

Christophe Riccio 9 tahun lalu
induk
melakukan
6ea28c83ff
1 mengubah file dengan 6 tambahan dan 0 penghapusan
  1. 6 0
      glm/detail/func_geometric.inl

+ 6 - 0
glm/detail/func_geometric.inl

@@ -183,6 +183,12 @@ namespace detail
 	}
 
 	// reflect
+	template <typename genType>
+	GLM_FUNC_QUALIFIER genType reflect(genType const & I, genType const & N)
+	{
+		return I - N * dot(N, I) * genType(2);
+	}
+
 	template <typename T, precision P, template <typename, precision> class vecType>
 	GLM_FUNC_QUALIFIER vecType<T, P> reflect(vecType<T, P> const & I, vecType<T, P> const & N)
 	{