summaryrefslogtreecommitdiffstats
path: root/external/include/glm/gtx/normal.inl
blob: e4423176bcb119ac49a0be559c0c56f124fc54e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// @ref gtx_normal
/// @file glm/gtx/normal.inl

namespace glm
{
	template <typename T, precision P> 
	GLM_FUNC_QUALIFIER tvec3<T, P> triangleNormal
	(
		tvec3<T, P> const & p1, 
		tvec3<T, P> const & p2, 
		tvec3<T, P> const & p3
	)
	{
		return normalize(cross(p1 - p2, p1 - p3));
	}
}//namespace glm