blob: c78d23ae62e9ceedef8fa9c99d98c303471d9b27 [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 : 2009-03-06
6// Licence : This source is under MIT License
7// File : glm/gtx/projection.inl
8///////////////////////////////////////////////////////////////////////////////////////////////////
9
10namespace glm
11{
12 template <typename vecType>
13 GLM_FUNC_QUALIFIER vecType proj
14 (
15 vecType const & x,
16 vecType const & Normal
17 )
18 {
19 return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal;
20 }
21}//namespace glm