blob: e6cb6b7f71ce513e117640c7757d12426b8f967b [file] [log] [blame]
Tony-LunarGb0b195d2015-05-13 15:01:06 -06001///////////////////////////////////////////////////////////////////////////////////////////////////
2// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
3///////////////////////////////////////////////////////////////////////////////////////////////////
4// Created : 2005-12-21
5// Updated : 2011-06-07
6// Licence : This source is under MIT License
7// File : glm/gtx/normal.inl
8///////////////////////////////////////////////////////////////////////////////////////////////////
9
10namespace glm
11{
12 template <typename T, precision P>
13 GLM_FUNC_QUALIFIER detail::tvec3<T, P> triangleNormal
14 (
15 detail::tvec3<T, P> const & p1,
16 detail::tvec3<T, P> const & p2,
17 detail::tvec3<T, P> const & p3
18 )
19 {
20 return normalize(cross(p1 - p2, p1 - p3));
21 }
22}//namespace glm