Function calculateGaussianHeight