sin and cos calls replaced by previously calculated vector, Pow(x,2) replaced by x*x