I have written this for my math class, as it saved me an accumulated time of three hours over a week of homework that involved the quads.
I a posting it here for anyone who wants to use, modify or otherwise use to go ahead and do so. Standard Quadratic Form applies here, Ax2 * Bx * C, and sometimes Ax2 * Bx = C, etc.
Thanks, And enjoy,
-Stev Täal