Got quadratic calc working properly