Modified MathHelper.h, removed duplicated code.