getMean function added to MathUtils