// 高斯公布公式------来自OGRE源程序
Real Math::gaussianDistribution(Real x, Real offset, Real scale)
{
Real nom = Math::Exp(
-Math::Sqr(x - offset) / (2 * Math::Sqr(scale)));
Real denom = scale * Math::Sqrt(2 * Math::PI);
return nom / denom;
}
找这个公式半天,结果自已的OGRE代码里就有,真是书非借不能读也.