// 高斯公布公式------来自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代码里就有,真是书非借不能读也.

posted on 2010-03-28 00:18  操作系统  阅读(267)  评论(0编辑  收藏  举报