1 /////////////////////////////////////////////////////////////////////////////////////////////////// 2 // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 /////////////////////////////////////////////////////////////////////////////////////////////////// 4 // Created : 2006-01-07 5 // Updated : 2008-10-05 6 // Licence : This source is under MIT License 7 // File : glm/gtx/extend.inl 8 /////////////////////////////////////////////////////////////////////////////////////////////////// 9 10 namespace glm 11 { 12 template <typename genType> 13 GLM_FUNC_QUALIFIER genType extend 14 ( 15 genType const & Origin, 16 genType const & Source, 17 genType const & Distance 18 ) 19 { 20 return Origin + (Source - Origin) * Distance; 21 } 22 23 template <typename T, precision P> 24 GLM_FUNC_QUALIFIER detail::tvec2<T, P> extend 25 ( 26 detail::tvec2<T, P> const & Origin, 27 detail::tvec2<T, P> const & Source, 28 T const & Distance 29 ) 30 { 31 return Origin + (Source - Origin) * Distance; 32 } 33 34 template <typename T, precision P> 35 GLM_FUNC_QUALIFIER detail::tvec3<T, P> extend 36 ( 37 detail::tvec3<T, P> const & Origin, 38 detail::tvec3<T, P> const & Source, 39 T const & Distance 40 ) 41 { 42 return Origin + (Source - Origin) * Distance; 43 } 44 45 template <typename T, precision P> 46 GLM_FUNC_QUALIFIER detail::tvec4<T, P> extend 47 ( 48 detail::tvec4<T, P> const & Origin, 49 detail::tvec4<T, P> const & Source, 50 T const & Distance 51 ) 52 { 53 return Origin + (Source - Origin) * Distance; 54 } 55 }//namespace glm 56