1/// @ref gtc_functions
2/// @file glm/gtc/functions.inl
3
4#include "../detail/func_exponential.hpp"
5
6namespace glm
7{
8	template <typename T>
9	GLM_FUNC_QUALIFIER T gauss
10	(
11		T x,
12		T ExpectedValue,
13		T StandardDeviation
14	)
15	{
16		return exp(-((x - ExpectedValue) * (x - ExpectedValue)) / (static_cast<T>(2) * StandardDeviation * StandardDeviation)) / (StandardDeviation * sqrt(static_cast<T>(6.28318530717958647692528676655900576)));
17	}
18
19	template <typename T, precision P>
20	GLM_FUNC_QUALIFIER T gauss
21	(
22		tvec2<T, P> const& Coord,
23		tvec2<T, P> const& ExpectedValue,
24		tvec2<T, P> const& StandardDeviation
25	)
26	{
27		tvec2<T, P> const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast<T>(2) * StandardDeviation * StandardDeviation);
28		return exp(-(Squared.x + Squared.y));
29	}
30}//namespace glm
31
32